Home   Help Search Login Register  

Author Topic: Respawning in plane and then a HALO script from there  (Read 1635 times)

0 Members and 1 Guest are viewing this topic.

HuNtA

  • Guest
Well, hello there. I've came here to ask a couple of questions, hopefully you'll be able to lend a hand (bit rusty at the ol' scripting after not playing OFP for a few years)

For my latest MP mission, i've got to make it so when the player dies, they firstly respawn, and are moveincargo'ed into a plane. I can easily see how that works, something like

@!alive _thebloke
@alive _thebloke
_thebloke moveInCargo haloplane


The problem I have from there, though, is twofold:
What do I do if the planes cargo spots are full at the time? I need something like a 'que' system, and
For the HALO part, I can't work out how to make it so the player leaves the plane without 'ejecting'. I remember how to do it in the past, but its slipped my mind since then.


Also, for quick clarity, the HALO script itself would be something like (don't bother correcting me on classnames)

*the bit where they leave the plane*
~5
_parachute = "parachute" createvehicle getpos _thebloke
_thebloke moveInDriver _parachute
exit

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Respawning in plane and then a HALO script from there
« Reply #1 on: 31 Aug 2006, 22:19:06 »
dont have time to write the script for ya going off for the weekend in a few hours
but

1) use a killed event handler attached to the player and then in the script that it runs
_veh is the plane you want them moved into

do something like the following


Quote
player removeall eventhandlers "killed"
@ alive player
player addeventhandler ["killed", blah blah blah]
?(alive _veh):player moveincargo _veh
@ (_time > 5) or (Player in crew _veh)
?! (alive _veh):exit
? (_time >=5): goto "QUEUE"
_para = "parachuteW" createvehicle (getpos player)
@ ! isnull _para
player moveindriver _para
exit


#QUEUE
_now = _time
player moveincargo _veh
@ (_time > (_now + 3)) or (Player in crew _veh)
?! (alive _veh) or (Player in crew _veh):exit
goto "QUEUE"






Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Respawning in plane and then a HALO script from there
« Reply #2 on: 01 Sep 2006, 15:33:50 »
You should alter the code a little so that players have to listen to some Muzak while queued!  :whistle:
urp!

DaveP

  • Guest
Re: Respawning in plane and then a HALO script from there
« Reply #3 on: 02 Sep 2006, 20:39:27 »
Thanks fellas, knew I could always count on you for support.. just as generous as you used to be  :good:

Offline rhysduk

  • Former Staff
  • ****
Re: Respawning in plane and then a HALO script from there
« Reply #4 on: 04 Sep 2006, 21:06:18 »
I had this idea before but for a singleplayer. Anway, are you going to have the plane continually circle overhead? Or makeit Land, Takeoff, Land Takeoff etc?
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)