Home   Help Search Login Register  

Author Topic: Ending a chopper mission  (Read 829 times)

0 Members and 1 Guest are viewing this topic.

Offline royalman51

  • Members
  • *
  • Hi There
Ending a chopper mission
« on: 28 May 2006, 19:32:14 »
Ime making a chopper mission. I want the mission to end when I step out of the heli. How can i make it end ???

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Ending a chopper mission
« Reply #1 on: 28 May 2006, 19:48:26 »
create a global variable chopper_boarded in the init file, set to false. set up a trigger, condition player in chopper_name, on activation chopper_boarded = true. then set up your ending trigger, condition this and chopper_boarded and not (player in chopper_name).

so, the player gets into the chopper, the variable switches to say he's in. the end trigger should be covering the ending helipad and will fire only when the player is inside, when the chopper has been boarded and the player is not in the chopper.

that said, if the player boards the chopper, then immediately gets out and runs into the trigger on foot, it will still fire... you sort of have to assume the player will not misbehave. ;)

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re: Ending a chopper mission
« Reply #2 on: 28 May 2006, 21:01:10 »
well thats the right way to do it.. but you can still doing it at the Fast way.. whit a script..
on any trigger you gant put this

Code: [Select]
[chopper,player] exec "getoutcheck.sqs"
And on teh script
Code: [Select]
#start
;getoutcheck.sqs
_player = _this select 1
_chopp = _this select 0

? ! _player in _chopp : endmissionvarialbe=true
~1
goto "start"

the difference is that you can get out/get in before the script is activated...

if I where U I'll chose the Bedges way =P