OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Zombie on 31 Oct 2002, 19:01:09

Title: 1.46 Vehicle Respawn Posistions
Post by: Zombie on 31 Oct 2002, 19:01:09
How can I make vehicles respawn in the same exact place I placed them in the beginning?  I use Karrillions vrs script for all my vehicle respawns, but sometimes they respawn inside builings or over hillsides.
Title: Re:1.46 Vehicle Respawn Posistions
Post by: Mike on 05 Nov 2002, 22:04:36
Id have to see the script...
Title: Re:1.46 Vehicle Respawn Posistions
Post by: Zombie on 05 Nov 2002, 22:37:01
ok, the scipt is attached.  The vehicles DO respawn, just not exactly in the same place everytime.
Title: Re:1.46 Vehicle Respawn Posistions
Post by: Mike on 06 Nov 2002, 21:57:33
It might be the spaces... Ive attached the same script but added spaces to the position dir and vehicles line below.. You will have to try it out. not sure if thats it. Back up the original before u overwirght


?!(local Server): Goto "end"
_vcl = _this select 0
_respawndelay = 20
_dir = Getdir _vcl
_position = Getpos _vcl
_Vehicles = []
Title: Re:1.46 Vehicle Respawn Posistions
Post by: Zombie on 07 Nov 2002, 02:20:41
Thanks, but that's not it either.  I've attached the entire mission folder, except for the sound folder, (file size restrictions), maybe that will help with the troubleshooting.  Everything else works great with this mission tho
Title: Re:1.46 Vehicle Respawn Posistions
Post by: dreaming_adam on 09 Nov 2002, 16:19:58
Not quite sure on the question here, and I cant download your script at the moment (on a restricted computer) but my suggestion if I understand your question is the following:


Then make the script detect if the unit is respawned...
Code: [Select]
_tankoriginalpos = getpos tank
_tankoriginaldir = getdir tank

#alive
~0.01
?(alive tank):goto "alive"
#dead
~0.1
?(!alive tank):goto dead
tank setpos _tankoriginalpos
tank setdir _tankoriginaldir
goto "alive

I havent tested the above code and its all off the top of my head so you may have to format it.. but U should get the general idea.. if ALIVE doesnt work, then use (getdammage < .5)

ciao ciao

Adam