Spawn soldier

Ask questions, discuss ideas, get answers
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

Spawn soldier

Post by anselmus »

ok, I created a building that can be destroyed, how do I make it spawn soldiers?
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: Spawn soldier

Post 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..)
What is the meaning of Life?? (Don't think about it!)
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

Re: Spawn soldier

Post by anselmus »

I create a hangar, BF1942, is it possible?
If you can give a help, thank you.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Spawn soldier

Post 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. ;)
ImageImageImage
I have cameras in your head!
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: Spawn soldier

Post 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
What is the meaning of Life?? (Don't think about it!)
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

you could take a look on the destroyable factory in the Battle of Britain map, it have some soldier spawns to it. :)
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: Spawn soldier

Post 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)
What is the meaning of Life?? (Don't think about it!)
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

Re: Spawn soldier

Post 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.
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: Spawn soldier

Post 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)
What is the meaning of Life?? (Don't think about it!)
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Spawn soldier

Post by Swaffy »

(Quad AA Bofors = Not-so-useless)

Or ... a 4-barreled 40mm cannon!
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply