Forums Index >> Modding >> assigning spawns



Page : <1> :


How do you assign a spawn to a bot? Like giving ri [bot] a specific spawn that no other bot can spawn in?
if someone tells me I'll write a tutorial for making a vehicle


Sunday, September 03, 2006 at 4:23:03 PM

The easiest way would be to edit the tankdata::ondestroyed function... Another way would be:

 

p ackage AssignSpawns
{
f unction spawnBotPlayer(%this)
{
Parent::spawnBotPlayer(%this);

I f(%this.nameBase $= "Ri [Bot]")
%this.player.setTransform("POSITION FOR RI");

e lse if(%this.nameBase $= "Mud [Bot]")
%this.player.setTransform("POSITION FOR MUD");
}
};
ActivatePackage(AssignSpawns);

 

Remember to lower-case the "if" as TT uppercases it... It's one of the bold letters!

This time I tested it :)
Just add that to the main.cs or the.mis, and change the positions. Remember, as more "numbers" in the position as possible! Best way to get them is using modwiz, plant an object, open the.mis, get the position, paste it here, and then remove the object from the.mis.

PS: It will NOT work with human players.


Last edited: Tuesday, September 05, 2006 at 12:37:39 PM

Sunday, September 03, 2006 at 4:38:35 PM

Doesn't work


Sunday, September 03, 2006 at 5:53:34 PM

Sorry it took me long to fix, just didn't have more chances before. Anyways, check the post before :)


Tuesday, September 05, 2006 at 12:38:19 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald