specifying spawn nodes for units?

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

specifying spawn nodes for units?

Post by MileHighGuy »

is there a way to make a specified unit only spawn from a defined path node?

thanks
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: specifying spawn nodes for units?

Post by RepSharpshooter »

Normal spawning is uncontrollable. You can always force spawn with SpawnCharacter() but that will spawn a character before he hits the spawn button. I think your best bet is to make an OnCharacterSpawn() event function, check the character class, (GetCharacterClass(character) ? ) and then depending on its value (it is an integer), teleport the character to do a different path node.
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: specifying spawn nodes for units?

Post by MileHighGuy »

i thought you couldnt put lua commands like that in bf1, ill try it anyway. what part of the lua do i put them in?
Post Reply