Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Devistute on November 30, 2015, 02:39:59 AM

Title: Enable Object When in Trigger Zone and mousebutton is pressed.
Post by: Devistute on November 30, 2015, 02:39:59 AM
So, i need help. I want to enable animation (gameobject) for turning an lever, when player is in triggerzone and presses mouse0. However i couldnt make the playMaker to do so, i had "OnTriggerEnter" on start, but i have no idea of how to implement the mouse press to it..? Do i have to edit the scripts, or is there a way to do this only in playMaker.  ???
Title: Re: Enable Object When in Trigger Zone and mousebutton is pressed.
Post by: wheretheidivides on November 30, 2015, 02:47:33 AM
Sounds like you are 1/2 there. 

1) Player enters trigger zone
2) Set variable to true.
3) Player clicks mouse
4) Set variable 2 to true
5) Play animation.

So the player clicks the button but must be in the trigger zone.  OntriggerEnter and OntriggerExit can be used to set variable to true or false.

Title: Re: Enable Object When in Trigger Zone and mousebutton is pressed.
Post by: Devistute on November 30, 2015, 02:50:42 AM
Oh. Well now that you put it that way, it actually makes sense. Thank you!
I will most likely come back to ask more help, since im pretty new with playMaker.

Edit: What type of Variable should i use?
Title: Re: Enable Object When in Trigger Zone and mousebutton is pressed.
Post by: djaydino on November 30, 2015, 10:36:03 AM
Hi,
i made a quick sample of how to set this up :


the fsm shown is the trigger location