Home   Help Search Login Register  

Author Topic: pop up targets nearly done...  (Read 1511 times)

0 Members and 1 Guest are viewing this topic.

Offline 22jacket

  • Members
  • *
  • I'm a llama!
pop up targets nearly done...
« 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


Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:pop up targets nearly done...
« Reply #1 on: 06 Sep 2005, 22:15:10 »
Code: [Select]
_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

Offline 22jacket

  • Members
  • *
  • I'm a llama!
Re:pop up targets nearly done...
« Reply #2 on: 06 Sep 2005, 22:35:36 »
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

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:pop up targets nearly done...
« Reply #3 on: 06 Sep 2005, 22:48:44 »
add

Code: [Select]
_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.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:pop up targets nearly done...
« Reply #5 on: 06 Sep 2005, 23:38:29 »
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
I know a little about a lot, and a lot about a little.

Offline 22jacket

  • Members
  • *
  • I'm a llama!
Re:pop up targets nearly done...
« Reply #6 on: 07 Sep 2005, 00:12:45 »
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..

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:pop up targets nearly done...
« Reply #7 on: 07 Sep 2005, 02:28:34 »
add a gamelogic named server to you mission, then add:
Code: [Select]
?!(local server):exitat the top of the script
i believe that should work