1
Ask a Question / Re: Do action after X times of pressed actor
« on: May 13, 2015, 02:46:49 am »
Solved, my phone was the one failling
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
This is really basic stuff you're asking, and megagewinnspiel's answer was clear enough. Go to the Stencylpedia and start studying.
Try using an "when mouse is pressed on actor" event
Just do it with a simple Number game attribute
Increase it by 1 every time the actor is pressed and reset it to 0 when 15 is reached and the AD is shown.
Have fun
Also, you don't need the green 'as degrees' blocks, you can simply just type in the degrees as numbers.
See mine below- this is the behaviour attached to the actor which manages the movement of the player actor.
The other blocks attached to the scene set the joystick in place and set the speed for the movement. It then checks to see if the 'distance' of the joystick is greater than 0 to see if it has moved. (This has a max of 1). If it has moved a Boolean is set to announce movement should occur. The direction is then pulled in from the direction block and speed applied.
All the other 'IF degree < or > etc' are just used to set what animation should be played. The code to get the player moving should actually be quite straight forward