OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 22jacket on 06 Sep 2005, 21:34:26
-
hi there
can u help...
I have fig 11 targets to pop up every 5 secs and drop down with 3 shots..
only trouble is they reset at zero degrees and go back to full health ..so say if i shoot a target which is 45 degrees it pops back up at zero.. same as 180..the target pops up facing backwards...
i use the script below which all the credit goes to bedges and triggerhappy
(thanks dudes)..can anyone help on the final piece to the jigsaw..
many thanks a bald 22jacket who has pulled all his hair out..lol..
_targ = _this select 0
_x = getpos _targ select 0
_y = getpos _targ select 1
_type = typeof _targ
~5
deletevehicle _targ
_newtarg = _type camcreate [_x, _y, 0.9]
_newtarg addeventhandler ["killed",{_this exec "popup.sqs"}]
exit
-
_targ = _this select 0
_x = getpos _targ select 0
_y = getpos _targ select 1
_type = typeof _targ
_dir = getdir _targ
~5
deletevehicle _targ
_newtarg = _type camcreate [_x, _y, 0.9]
_newtarg addeventhandler ["killed",{_this exec "popup.sqs"}]
_newtarg setdir _dir
exit
-
bedges ur my hero....
last thing...lol
how can i keep the health down to single shot as when they pop up again its full health....
nearly there..lol.... ;D :D
-
add
_newtarg setdamage 0.8
under the setdir command. you may need to adjust the value slightly depending on how strong a single bullet is - it may well need to be set at 0.99.
-
Reply #14 of this thread?
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=25021
-
It would have been better if this had been continued in the thread mentioned by THobson instead of starting a new one.
Something to remember for the future perhaps. ;D ;D
Planck
-
ok..sorry about that..
just one final thing..works a treat ,,but not in multiplayer...is there a way to save it as mulitplayer...tried it on our server but did not work..
-
add a gamelogic named server to you mission, then add:
?!(local server):exitat the top of the script
i believe that should work