Page 1 of 2
Create SpawnPoints attached to a new flag ?
Posted: Thu May 19, 2011 8:06 pm
by tekk
Correct me if I am wrong , You can add a new flag to a conquest map but you CAN'T attach spawnpoints to it right ?
You can add spawns ripped from vehicles to the new flag obviously but the soldierspawns wont change to whoever is holding the flag.
I just need this reiterated to me incase someone has figured out how to attach soldierpawns to a NEW flag.
Re: Create SpawnPoints attached to a new flag ?
Posted: Fri May 20, 2011 2:25 am
by Swaffy
Yes, you can create new spawns and you can attach them to a flag. You can use Editor '42 or BattleCraft '42 to do that.
The soldier spawns will spawn soldiers of the team that the flag is currently set to.
The object spawn will spawn whatever vehicle is set on the flag's team [Team 1 is Axis, team 2 is Allies].
In order for a soldier or object spawn to be attached to a flag, it needs to have the correct flag ID to tell it which flag to attach to.
rem SoldierSpawnTemplates
ObjectTemplate.create SpawnPoint AxisSpawnPoint_bunker3
ObjectTemplate.setSpawnId 1
ObjectTemplate.setGroup 1
rem SoldierSpawns
Object.create AxisSpawnPoint_bunker3
Object.absolutePosition 827.41/56.32/1108.13
Object.rotation 0.00/0.00/0.00
rem ObjectSpawnTemplates
ObjectTemplate.create ObjectSpawner MachinegunSpawner
ObjectTemplate.setObjectTemplate 1 stationary_mg42
ObjectTemplate.setObjectTemplate 2 stationary_browning
ObjectTemplate.MinSpawnDelay 35
ObjectTemplate.MaxSpawnDelay 55
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.teamOnVehicle 0
rem ObjectSpawns
Object.create MachinegunSpawner
Object.absolutePosition 736.35/79.03/893.66
Object.rotation 63.36/0.00/0.06
Object.setOSId 6
Object.setTeam 2
Posted: Fri May 20, 2011 7:25 am
by freddy
try if you can spawn the flags first then i think we can sort the spawns later. all iwé tried is the ctf flags in the coral sea map and that works fine. however there is some flag code in the init.con on coral sea from start.
Code: Select all
rem
rem *** Define flags ***
rem
ObjectTemplate.create Flag BlueFlag
ObjectTemplate.team 1
ObjectTemplate.networkableInfo FlagBodyInfo
ObjectTemplate.radius 5
ObjectTemplate.TimeToReSpawn 10
ObjectTemplate.addTemplate AnimatedItFlag
ObjectTemplate.create Flag RedFlag
ObjectTemplate.team 2
ObjectTemplate.networkableInfo FlagBodyInfo
ObjectTemplate.radius 5
ObjectTemplate.TimeToReSpawn 10
ObjectTemplate.addTemplate AnimatedUkFlag
Re: Create SpawnPoints attached to a new flag ?
Posted: Fri May 20, 2011 3:17 pm
by tekk
Hey thanks Swaffy for the info, I will give it a go , I honestly didnt think that it could be done SS. And freddy the flags are already on the map so hopefully all goes good with the new info.
Re: Create SpawnPoints attached to a new flag ?
Posted: Sun May 22, 2011 1:08 am
by tekk
Swaffy - I tried your suggestion and Its not working , Keep getting a CTD
Freddy - The flags are already on the map BUT they were coded with NO soldierspawns attached.
This is one flag im attempting to add soldier spawns too
ControlPointTemplates
Code: Select all
rem -----------------------------------------
rem --- West_No_Fly_Zone ---
rem -----------------------------------------
ObjectTemplate.create ControlPoint West_No_Fly_Zone
ObjectTemplate.networkableInfo ControlPointInfo
ObjectTemplate.setControlPointName West_No_Fly_Zone
ObjectTemplate.radius 150
ObjectTemplate.team 0
ObjectTemplate.spawnGroupId 3
ObjectTemplate.objectSpawnerId 3
ObjectTemplate.areaValue 50
ObjectTemplate.timeToGetControl 5
ObjectTemplate.timeToLoseControl 5
ObjectTemplate.disableIfEnemyInsideRadius 0
ObjectTemplate.disableWhenLosingControl 0
ObjectTemplate.loseControlWhenEnemyClose 1
ObjectTemplate.loseControlWhenNotClose 0
ObjectTemplate.geometry flagbase_m1
ObjectTemplate.hasCollisionPhysics 0
ObjectTemplate.addTemplate AnimatedFlag
ObjectTemplate.setPosition 0.000000/8.200000/0.000000
ObjectTemplate.setTeamGeometry 1 flagge_m1
ObjectTemplate.setTeamGeometry 2 flagus_m1
spawnPointManagerSettings
Code: Select all
rem -----------------------------------------
rem --- group 3 ---
rem -----------------------------------------
spawnPointManager.group 3
spawnPointManager.groupTeam 0
spawnPointManager.groupIcon test1.tga
SoldierSpawnTemplates
Code: Select all
rem -----------------------------------------
rem --- West_No_Fly_Zone Spawns ---
rem -----------------------------------------
ObjectTemplate.create SpawnPoint West_No_Fly_Zone_Spawn1 <--- Created this
ObjectTemplate.setSpawnId 32 <----Followed the order of spawns and gave this one 32
ObjectTemplate.setGroup 3
SoldierSpawns
Code: Select all
rem -----------------------------------------
rem --- West_No_Fly_Zone Spawns ---
rem -----------------------------------------
Object.create West_No_Fly_Zone_Spawn1
Object.absolutePosition 1565.00/19.71/939.05
Object.rotation 90/0/0
So to me this looks all good , followed the same steps as the main bases are coded with the only differnce is the "West_No_Fly_Zone_Spawn1" didnt exist and I created that. As the code is right now im getting CTD's as I expected I would. Swaffy have you actually been able to do this SSM or did you think I meant CSM ? Thanks fellas
Posted: Sun May 22, 2011 6:51 am
by freddy
the way i would go on to do this ssm, instead of tie the spawn directly to the flag you tie a wehicle spawn to the flag. thats the culprit, if you can do that then you can code that spawn and a wehicle that has a soldierspawn on it to simulate a "ordinary" flag soldierspawn
tekk wrote:You can add spawns ripped from vehicles to the new flag obviously but the soldierspawns wont change to whoever is holding the flag.
edit: on second tought im not so sure, need to checkout a bit closer how the flags works
Re: Create SpawnPoints attached to a new flag ?
Posted: Sun May 22, 2011 8:50 am
by tekk
Ya I thought about that idea already , Tie a spawn helo from each side to the flag so that which ever team has possesion of the flag has there soldier spawns. Thing would be thou the team that turns the flag would have to destroy the oppossing spawn helo in order to get their spawn helo cause if they dont then the enemy can continue to spawn on the flag. Not a very practical solution for me , but I think this is the same as adding a new objectspawn in the OS.con , cant be done SS.
Posted: Sun May 22, 2011 11:52 am
by freddy
if you can get that far im sure we can fix the resident spawn issue
tekk wrote:Thing would be thou the team that turns the flag would have to destroy the oppossing spawn helo in order to get their spawn helo cause if they dont then the enemy can continue to spawn on the flag.
Re: Create SpawnPoints attached to a new flag ?
Posted: Sun May 22, 2011 6:27 pm
by Swaffy
Instead of a helo, if you're going for a soldier-only flag, you can probably just spawn a Browning M2 or some other stationary MG.
Re: Create SpawnPoints attached to a new flag ?
Posted: Sun May 22, 2011 7:34 pm
by tekk
Well I been thinking about this more and came up with a thought, Might not be all that pretty but should simulate a spawnpoint closely as you suggested freddy.
I attach two vehicles to that flag, one for each team and spawn them high up above flag and attach spawnpoints to those vehicles on the ground . Now the thought would be that the vehicle will spawn for the team in possesion and fall and destroy after so many seconds like around 4-5sec. Basically the spawnpoints for the flag owner will be refreshed every 4-5sec untill the flag becomes neutral at which point no vehicles will spawn for either team, once captured the new flag owners vehicle will spawn and so will their spawnpoints.
The flag spawn might dissapear for a second or two in the spawn menu but im sure by tweaking the timing on the vehicles I can keep it to a minimum.
Code: Select all
ObjectTemplate.create ObjectSpawner willyspawner
ObjectTemplate.setObjectTemplate 1 BRDM2
ObjectTemplate.setObjectTemplate 2 humvee
ObjectTemplate.MinSpawnDelay 5 <--- keep the spawns low
ObjectTemplate.MaxSpawnDelay 5
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 5 <----keep this low
ObjectTemplate.Distance 1 <---- Keep this low so vehicle
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.maxNrOfObjectSpawned 1
That should give me about 5sec I think between new vehicle spawns refreshing, No I wont be adding a holdobject to the vehicle and would prob be best for me to add code to remove the vehicle wreckage instantly to prevent any kind of lagg.
Doing it this way would eliminate the problem of the flag owner having to manually destroy the other teams spawnpoint. I will try this out and see how it looks.