Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 10-18-2007, 06:01 PM   #1
shadow
Retired FF Staff
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Class-Specific Spawns

I remember this feature being promised a long time ago, is it possible to implement it in LUA yet? If so, how?

I've looked around the base lua files and haven't seen anything I can usefully derive to this end.
shadow is offline   Reply With Quote


Old 10-19-2007, 12:02 AM   #2
Major Lee High
Retired Mapper
 
Major Lee High's Avatar
 
Join Date: Mar 2007
Location: Tulsa, OK
Posts Rated Helpful 1 Times
http://www.fortress-forever.com/foru...ad.php?t=12444

That thread mentions how to make a teleporter class only, i would guess that you would use something similar to check the class in the spawn point code, using the validspawn function.
Major Lee High is offline   Reply With Quote


Old 10-19-2007, 11:00 AM   #3
stino
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
validspawn isn't a function but a var.

red_pyrospawn = info_ff_teamspawn:new({validspawn = is_validspawn(class = Class.kPyro, team = Team.kRed)})

and eh, download ff_badlands to see the rest since i don't remember it anymore , the lua code for badlands includes a sniper only spawn and the other spawns dont allow snipers to spawn

badlans:
http://www.sgware.be/?p=downloads&f=view&id=31
stino is offline   Reply With Quote


Old 02-27-2008, 12:01 PM   #4
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
So I spent a few hours on this and gave up. I know some of you shit code in your sleep but I'm no good unless someone does it for me. So I'm asking again how you do this in a map. Below is what I found in Badlands, but I can't get it working.

Quote:
redsniperspawn = { validspawn = redsniperallowedmethod }

bluesniperspawn = { validspawn = bluesniperallowedmethod }

-----------------------------------------------------------------------------
-- Class Spawn functions
-----------------------------------------------------------------------------

redsniperallowedmethod = function(self,player) return player:GetTeamId() == Team.kRed and player:GetClass() == Player.kSniper end

bluesniperallowedmethod = function(self,player) return player:GetTeamId() == Team.kBlue and player:GetClass() == Player.kSniper end

rednosniperallowedmethod = function(self,player) return player:GetTeamId() == Team.kRed and (player:GetClass() == Player.kSniper) == false end

bluenosniperallowedmethod = function(self,player) return player:GetTeamId() == Team.kBlue and (player:GetClass() == Player.kSniper) == false end

red_sniper_spawn = { validspawn = redsniperallowedmethod }

blue_sniper_spawn = { validspawn = bluesniperallowedmethod }

red_spawn = { validspawn = rednosniperallowedmethod }

blue_spawn = { validspawn = bluenosniperallowedmethod }
Doughnut-4|4- is offline   Reply With Quote


Old 02-27-2008, 02:10 PM   #5
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
That's the code you need man...what class are you wanting to spawn?
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 02-27-2008, 11:10 PM   #6
shadow
Retired FF Staff
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
look at the lua for ff_session, it has offense spawns (med/scout) only and it certainly works.
shadow is offline   Reply With Quote


Old 02-28-2008, 04:18 AM   #7
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
The more I edit my LUA the more things end up not working. I restarted my LUA from scratch and this code works fine. I just need to get everything working at the same time. If the frustration keeps up I'll just post my entire LUA for help when I go beta.

Thanks for the help.
Doughnut-4|4- is offline   Reply With Quote


Old 02-28-2008, 05:41 AM   #8
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by Doughnut-4|4-
The more I edit my LUA the more things end up not working. I restarted my LUA from scratch and this code works fine. I just need to get everything working at the same time. If the frustration keeps up I'll just post my entire LUA for help when I go beta.

Thanks for the help.
do it man...there's a whole division now (run by Squeek) to help people with lua issues and problems...seek out the orangish names and you will get help!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:33 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.