Home   Help Search Login Register  

Author Topic: Respawn from h**l  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

sweofp

  • Guest
Respawn from h**l
« on: 14 Jun 2005, 18:05:58 »
Hello!
I need some help with a respawn script for a SP mission, the respawn should be for the AI. I want to respawn soldiers/tanks/veh in predefined areas.
If anyone please could direct me to such a script or help me with an exampel, I could implement it myself to Ofp.

Cheers!

 8)

CopyrightPhilly

  • Guest
Re:Respawn from h**l
« Reply #1 on: 16 Jun 2005, 01:01:57 »
may be this is of some help...

unit/vehicle init [this] exec "filename.sqs"

script:

Code: [Select]
_object = _this select 0
_pos = getpos _object
_dir = getdir _object
_type = typeof _object

#start
@!(alive _object)
deletevehicle _object
_tmp = _type createvehicle _pos
_tmp setdir _dir
_tmp setpos _pos
player reveal _tmp
_object = _tmp
goto "start"

this will not respawn the veicles crew, so if u want to add its crew again then you will need to add a cheak
example
Code: [Select]
?_type == "M60": _c = "SoldierWCrew" createvehicle [0,0,0] ;_c moveindriver _tmp;_c = "SoldierWCrew" createvehicle [0,0,0] ;_c moveInGunner _tmp;_c = "SoldierWCrew" createvehicle [0,0,0] ;_c moveInCommander _tmp
there could well be an easyer way, but not that i can think of...