OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: xCIA_BlackThorn on 23 May 2005, 03:22:54
-
Respawning a Static Object instantly after it is detroyed is what I want to do. I am unsure as to what to use for spawning, as all the other spawning scripts i've seen are for Vehicles and Units.
-
add a 'killed' event handler to the object to sense when it's 'dead'. make it something like this:
object_name addeventhandler ["killed","{[_this] exec "instant_respawn.sqs"}]
then copy/paste this:
;instant respawn
_what = _this select 0
_x = getpos _what select 0
_y = getpos _what select 1
_obj = "object" camcreate [_x,_y]
exit
save that as "instant_respawn.sqs".
that should work, assuming you know the camcreate 'name' of the static object you're trying to respawn.
-
Thanks bedges. This has help alot, my mission is gonna be a unique one i hope.
keep up the good work.