OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: jippojudas on 26 Jan 2004, 14:33:39

Title: Multiple subject/cti templates/other
Post by: jippojudas on 26 Jan 2004, 14:33:39
ok number one im looking for some un-official cti/c&h templates for personal use does anyone know where to get any?,
ok two how can i make vehicles respawn back to their original places in multiplayer,
one more i put a lampost and i want it on ive named it lamp , so what command do i put to keep it on , cheers
leigh u guys are clued up unlike me :p
Title: Re:Multiple subject/cti templates/other
Post by: StonedSoldier on 26 Jan 2004, 16:01:33
2.
lamp switchlight on or lamp switchlight "on"

i cant remeber which one
Title: Re:Multiple subject/cti templates/other
Post by: jippojudas on 26 Jan 2004, 19:34:07
cheer matey, do u know the answer to teh others?
Title: Re:Multiple subject/cti templates/other
Post by: StonedSoldier on 27 Jan 2004, 01:03:40
ok the vehicle respawn thing, i made a mp map and made my own sorta vehicle respawn script, you'll prolly be able to find better but hey lets go...

1. Place your vehicle eg Mi17 lets call it hind
2. Place an invisible helipad underneath the hind and call it helipad[/i]
3. place a trigger, set it to Repeatedly

Condition : getdammage hind > 0.9
On Activation : [hind,helipad] exec "respawn.sqs"

4. Save the script in your mission folder as respawn.sqs

Code: [Select]
_vehicle = _this select 0
_respawn = _this select 1
hint "Unit Destroyed"
~5
_vehicle setdammage 0.0
_vehicle setpos getpos _respawn
hint "Unit Repaired"

exit

To alter the time it takes to respawn play around with the ~5 bit.
To add more respawnable vehicles repeat steps 1, 2 and 3 making sure to swap the names of the vehicles and helipads Note where its says [hind,helipad] exec "respawn.sqs" "hind is the name of the veichle and "helipad" is the name of the helipad where the vehicle will respawn at.


this respawn script basically just detects when a vehicle is destroyed, repairs it then moves it to a helipad, if your wanting a script where a fresh helicopter is produced and the destroyed one stays where it is, ill post it here soon. Although this script is good as it minmizes the amount of broken vehicles on the battlefield, thus reducing lag

Jeez....i cant stop typing.....by far mt longest post ever!!