Page 1 of 2

Spawn soldier

Posted: Fri Jan 13, 2012 6:09 pm
by anselmus
ok, I created a building that can be destroyed, how do I make it spawn soldiers?

Re: Spawn soldier

Posted: Fri Jan 13, 2012 11:29 pm
by Dennis|8749236
First: creat a spawnpoint template
Second: creat spawnpoint
Thrid: add it to your vehicle. Also, make sure the spawning group have Team ID assigned and it is correct.
And i dont know which game you are talking about, different game have different settings so i can't provide you the code
(they maybe similar but there still have some difference..)

Re: Spawn soldier

Posted: Sat Jan 14, 2012 2:20 pm
by anselmus
I create a hangar, BF1942, is it possible?
If you can give a help, thank you.

Re: Spawn soldier

Posted: Sat Jan 14, 2012 9:48 pm
by Apache Thunder
I've moved this topic to the modding discussion as it the general discussion is geared more towards overall discussion of Battlefield games and not for modding specific questions to Battlefield 1942. ;)

Re: Spawn soldier

Posted: Sun Jan 15, 2012 3:57 pm
by Dennis|8749236
Ok...
Just as i said, follow my step.
But i will provide you example code.
Example for First Step:

Code: Select all

rem *** ExampleSP ***
ObjectTemplate.create SpawnPoint ExampleSP
rem - This one sets the spawn point ID, it needed to be unique ID when you are modding a map's soldierspawnpoint
rem - But i like to keep it 0 for all..
ObjectTemplate.setSpawnId 0
rem - The spawn grounp, the spawn group can be set to specific team only
rem - Goto Game.rfa/GlobalSpawnGroup to check all the spawn group
rem - Or creat your own one..
ObjectTemplate.setGroup 81
rem - This line means when player spawned, there must be a vehicle he/she can enter, else the spawnpoint will be deactivated
ObjectTemplate.setEnterOnSpawn 0
rem - Same as above, but only for AI, also theres a line in the SpawnGroup that set which player can use the spawnpoint. 
ObjectTemplate.setAIEnterOnSpawn 0
rem - This line means, when the player is spawned, the parachute is open or not..
rem - Usually used when the spawnpoint is high..
ObjectTemplate.setSpawnAsParaTroper 0

SpawnGroup:

Code: Select all


rem - The group ID
spawnPointManager.group 81
rem - Assign the Group to specific team, if you remove it or keep it 0 then neither the team will have it
spawnPointManager.groupTeam 2
rem - Forgot what does this line do..
spawnPointManager.groupEnableToChangeTeam 0
rem - The icon that displayed on the Spawn Interface
spawnPointManager.groupIcon test2.tga
rem - This line tells the game the spawnpoint that have this group can only be used by AI
spawnPointManager.OnlyForAI 0
rem - Same as above, but only for human.
spawnPointManager.OnlyForHuman 0

Second Step:
Actually i made a mistake on second step, if you are adding a spawn point to a vehicle or something, then you dont need to creat spawnpoint, just add the spawnpoint template to your vehicle or something..


Third Step:
Add this code to your vehicle. On lod or main PCO, or somewhere else...

Code: Select all

ObjectTemplate.addTemplate ExampleSP
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 0/0/0
Last thing: Debug =P

Posted: Sun Jan 15, 2012 6:00 pm
by freddy
you could take a look on the destroyable factory in the Battle of Britain map, it have some soldier spawns to it. :)

Re: Spawn soldier

Posted: Mon Jan 16, 2012 3:01 pm
by Dennis|8749236
Thats a great idea too.
Btw, if you have 3DSMax or Gmax, that would very helpful to determine the spawn point on factory. (The coordinate value in 3DSMax must divide by 10 to match the value in BF1942)

Re: Spawn soldier

Posted: Mon Jan 16, 2012 7:08 pm
by anselmus
I'm creating a map, this map the goal is to prevent the Germans succeed in destroying buildings in the English countryside.
Rockets will be used "V1" by the Germans and the British will have to destroy before they succeed.
But it must be buildings that spawn soldiers so that the Germans win .. style, BoB.

Re: Spawn soldier

Posted: Mon Jan 16, 2012 9:18 pm
by Dennis|8749236
That would be a nice map.
But i wish it is not like Battle of Britain, German wins all the time because the Objective target go boom too quick...
(AA Gun = Useless)

Re: Spawn soldier

Posted: Tue Jan 17, 2012 12:11 am
by Swaffy
(Quad AA Bofors = Not-so-useless)

Or ... a 4-barreled 40mm cannon!