Create SpawnPoints attached to a new flag ?

Ask questions, discuss ideas, get answers
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

that idea sounds good. i will put in some more toughts lol

the timetoliveafterdeath code, wreck gone in a blink this: http://bfmods.com/mdt/scripting/ObjectT ... Death.html
but you may already know that one :)

you could use eighter a deathbubble or manipulate the criticalDamage settings to get rid of the vehicle in a certain timelimit say perhaps 2 seconds and adjust the spawner to match the timings if you dont want to wait for the vehicle to fall and crash.

anyway happy coding and good luck
tekk
Posts: 171
Joined: Fri Dec 11, 2009 6:12 pm

Re: Create SpawnPoints attached to a new flag ?

Post by tekk »

The deathbubble would save some coding for sure but a concern about that would be that vehicle wreckages from the deathbubble stick where they die so it would either instantly kill the vehicle spawns after the first one, or I will end up with so much wreckage that it would create server lag. Worth a shot thou and see what the results would be, can a death bubble kill a unmanned vehicle thou ? if yes how would that code look ?
Nodbrother- "getting whiped every single game by some over-active 9 year old kid with too much spare time and a reaction time that is a third of yours."
tekk
Posts: 171
Joined: Fri Dec 11, 2009 6:12 pm

Re: Create SpawnPoints attached to a new flag ?

Post by tekk »

Well I did the code and it works like a charm.

The downfall ..... Its a pain to code and tweak but then again what mod isnt lol

The spawn point in the in-game spawn menu blinks about 8sec but other than that a average player wouldnt notice.

This is how I did it, if anyone can think of a better way plz let me know.

OST.con

Code: Select all

rem ----------------------------------------- 
rem ---  F14Spanwer  ---
rem ----------------------------------------- 
ObjectTemplate.create ObjectSpawner F14Spanwer
ObjectTemplate.setObjectTemplate 1 BlackMedal
ObjectTemplate.setObjectTemplate 2 BlackMedal
ObjectTemplate.MinSpawnDelay 8
ObjectTemplate.MaxSpawnDelay 8
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.maxNrOfObjectSpawned 2

rem ----------------------------------------- 
rem ---  evacspawner  ---
rem ----------------------------------------- 
ObjectTemplate.create ObjectSpawner evacspawner
ObjectTemplate.setObjectTemplate 1 Sub7C
ObjectTemplate.setObjectTemplate 2 Gato
ObjectTemplate.MinSpawnDelay 10
ObjectTemplate.MaxSpawnDelay 20
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.holdObject 1

rem ----------------------------------------- 
rem ---  PickupSpawner  ---
rem ----------------------------------------- 
ObjectTemplate.create ObjectSpawner PickupSpawner
ObjectTemplate.setObjectTemplate 1 Kubelwagen
ObjectTemplate.setObjectTemplate 2 Willy
ObjectTemplate.MinSpawnDelay 1
ObjectTemplate.MaxSpawnDelay 1
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 1
ObjectTemplate.Distance 1
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.holdObject 1
ObjectTemplate.maxNrOfObjectSpawned 1

rem -------------------------------------------------
rem ----- Simulated Spawn Points --------------------
rem -------------------------------------------------

ObjectTemplate.active Willy
ObjectTemplate.addTemplate gatoDriverSoldierSpawn
ObjectTemplate.setPosition 0/-20000.00/0

ObjectTemplate.active Kubelwagen
ObjectTemplate.addTemplate Sub7CDriverSoldierSpawn
ObjectTemplate.setPosition 0/-20000.00/0

ObjectTemplate.Active GatoComplex
ObjectTemplate.RemoveTemplate 4

ObjectTemplate.Active Sub7CComplex
ObjectTemplate.RemoveTemplate 4

rem ------- To reduce any possible server lag --------

ObjectTemplate.Active Willy
ObjectTemplate.timeToLiveAfterDeath 1

ObjectTemplate.Active Kubelwagen
ObjectTemplate.timeToLiveAfterDeath 1

ObjectTemplate.Active BlackMedal
ObjectTemplate.timeToLiveAfterDeath 1
OS.con

Code: Select all

rem ----------------------------------------- 
rem ---  F14Spanwer  ---
rem ----------------------------------------- 
Object.create F14Spanwer
Object.absolutePosition 851.40/51.53/3572.71
Object.rotation 89.72/0.00/0.00
Object.setOSId 2
Object.setTeam 2

rem ----------------------------------------- 
rem ---  Opposition Sub  ---
rem ----------------------------------------- 
Object.create evacspawner
Object.absolutePosition 1712.01/2511.50/1923.18
Object.rotation 0.00/0.00/0.00
Object.setTeam 1

rem ----------------------------------------- 
rem ---  Coalition Sub  ---
rem ----------------------------------------- 
Object.create evacspawner
Object.absolutePosition 1743.73/2511.36/1923.29
Object.rotation 0.00/0.00/0.00
Object.setTeam 2

rem ----------------------------------------- 
rem -- This vehicle will drop on the spawn --
rem -- vehicle keeping it refreshed !! ------
rem ----------------------------------------- 
Object.create F14Spanwer
Object.absolutePosition 1719.97/10300.00/1902.63
Object.rotation 0.00/0.00/0.00
Object.setTeam 1

rem ----------------------------------------- 
rem -- This object will destroy the vehicle 
rem -- that misses the spawn vehicle during 
rem -- flag turnover
rem -----------------------------------------
Object.create barack_m1 
Object.absolutePosition 1719.97/9995.00/1902.63
Object.rotation 0/0/0

rem ----------------------------------------- 
rem --- Middle Flag Team Spawns  ---
rem ----------------------------------------- 
Object.create PickupSpawner
Object.absolutePosition 1719.97/10000.00/1902.63
Object.rotation 0.00/0.00/0.00
Object.setOSId 4
Object.setTeam 1
Now I did mention that the code wouldnt be pretty but the method works for me on DC No Fly Zone lol
Nodbrother- "getting whiped every single game by some over-active 9 year old kid with too much spare time and a reaction time that is a third of yours."
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

nice! it takes some trickering to get things to work ssm :) you may be right about the wrecks and deathbubbles so better use the method you have now, the way to get unmanned vehicles to take damage/healing from bubbles is to look them to a team

Code: Select all

ObjectTemplate.teamOnVehicle
edit: i dont know if its needed but if you want to get the jeeps destroyed easily you can crank up there speedmod some
Post Reply