Page 1 of 1

Automatic Spawn

Posted: Tue Jul 07, 2009 1:00 pm
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?

Re: Automatic Spawn

Posted: Tue Jul 07, 2009 6:02 pm
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.