Blockland Forums > Help

Which addon uses OnInput

Pages: << < (3/3)

phflack:

oh, named brick, not "Beta"

Light And Day:

Drrr.

phflack:

well, it's more common to say named brick as that is a real target, while beta is an option of it
/do'h

Orthone:


--- Quote from: Light And Day on April 06, 2010, 08:51:25 PM ---onactviate>Beta>SetPlayerControl
onactvivate>self>VCE_Ifvariable><var:cl>lastmsg> == Out
onvariabletrue>self>exitplayercontrol
fails

--- End quote ---

--- Quote from: Orthone on April 07, 2010, 03:41:02 AM ---That's because when you activate it you control the vehicle. But it also checks to see if you said 'Out' as your last message when clicking it to kick you out of the vehicle. You would need a relay to make that work.

--- End quote ---



--- Code: ---[0] [0] onActivate -> namedBrick(Beta) -> setPlayerControl
[1] [0] onActivate -> self -> fireRelay
[2] [0] onActivate -> self -> setEventEnabled [0 1 2 3] [unchecked]
[3] [0] onActivate -> client -> chatMsg -> You are controlling a vehicle! Say 'Out' aloud to exit!
[4] [0] onRelay -> self -> fireRelay
[5] [0] onRelay -> self -> ifValue -> <var:cl:lastMsg> -> equals -> Out
[6] [0] onVariableTrue -> self -> cancelEvents
[7] [0] onVariableTrue -> self -> setEventEnabled [0 1 2 3] [checked]
[8] [0] onVariableTrue -> client -> chatMsg -> You exit the vehicle!
[9] [0] onVariableTrue -> --- I don't remember the outputs for leaving the vehicle. You shouldn't have a extremely hard time finding them. ---

--- End code ---

If there are any problems with this, add in a picture of your events for the brick that makes the player control the 'Beta's vehicle.

Light And Day:

Ok thx!

Pages: << < (3/3)

Go to full version