Home   Help Search Login Register  

Author Topic: solved:event handler help  (Read 1550 times)

0 Members and 1 Guest are viewing this topic.

Offline smoke52

  • Members
  • *
solved:event handler help
« on: 14 May 2007, 22:25:26 »
In a mission im making the player starts next to a boat to look as if he just jumped out and ready to start the mission. while testing i thought what if the player jumped in the boat and tried taking off and going somewhere i dont want them to? :)

well i think i need an event handler but im not sure how to do it. all i want is so if the person tries jumping in the boat it will spit him out, after he hits a trigger i would like it removed so when he finishes the mission he can return and go to the extraction point using the boat.

thanks for the help.
« Last Edit: 15 May 2007, 02:04:00 by smoke52 »

Offline dematti

  • Members
  • *
Re: event handler help
« Reply #1 on: 14 May 2007, 23:16:47 »
like to help ya here but can you be more specific?

Is the player an enemy wich you have to shoot?
You want him to get in the boat but then get spit out?
What you want removed?
 :dunno:

Offline smoke52

  • Members
  • *
Re: event handler help
« Reply #2 on: 14 May 2007, 23:29:49 »
its a single player mission with just you the "player". i want it so the player cannot jump into the boat right off the start. because he could go somewhere closer to the objective which will bypass some needed triggers to keep my mission playing out like it should. after all the objectives are complete i would like this event handler removed so the player can return to the extraction point and drive off in the boat.
« Last Edit: 14 May 2007, 23:33:46 by smoke52 »

Offline dematti

  • Members
  • *
Re: event handler help
« Reply #3 on: 14 May 2007, 23:39:55 »
ok i understand now
but uhm... i think we need someone who knows this better :P

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: event handler help
« Reply #4 on: 15 May 2007, 00:12:24 »
You might be able to "lock" the boat when you create it pressing F1 in the editor.  Upper left "Lock".  If not that you could just setpos the boat a little ways away after the player starts moving.  Or deletevehicle "BOATNAME" in a script

Check the COMREF for player actions on how to eject from a vehicle.

Offline smoke52

  • Members
  • *
Re: event handler help
« Reply #5 on: 15 May 2007, 01:34:42 »
well i had a trigger that was set to

condition: player in pbxboat
on act: player action ["eject", pbxboat]

but it would eject him no matter what...i looked for a way to delete the trigger but i dont think theres a command so i think an event handler will help here but i dont know how to use them...you gave me an idea though that im going to have to try  :good:

EDIT: all i needed was the setTriggerStatements command

problem solved!
« Last Edit: 15 May 2007, 02:03:44 by smoke52 »

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: solved:event handler help
« Reply #6 on: 15 May 2007, 03:59:15 »
could be simpler to add this to the objective before he's supposed to use the boat...

vehiclename lock false

...but as usual...wtf do I know?! ???
just setpos & forgetpos!