Automatic Spawn

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Automatic Spawn

Post by sampip »

I was just wondering how you force the player to spawn as a certain character at the beginning of the map and after death.
i know its done on ord ibana (conversion pack)"king mode" when the unit dies, he is automatically respawned as the same character he was before. the same aspect is also used in halo.
is there a certain code i need to use?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Automatic Spawn

Post by Frisbeetarian »

From a stock campaign Lua script:

Code: Select all

        SelectCharacterClass(characterindex, classindex)
        SpawnCharacter(characterindex, GetPathPoint("leia_spawn", 0)) 
No this doesn't say how to use it; I understand. If you look at tan1g_c.lua and other Lua scripts that also contain these functions (you can use Zerted's search program; that's the easiest way) as well as searching this site, you should gain a full grasp of how to use these.

If it's in the King of the Hill mode script, then look at that, too.
Post Reply