Help! Can't get "On any touch start" working!

Get help using Construct 2

Post » Wed Feb 08, 2017 6:09 pm

Hello Construct community!

I've only been testing out Construct 2 for couple of days now and I'm loving it! But now I've got a problem that I just can't figure out. I have a simple code where I use On any touch start to change the direction of the player. But for some reason On any touch doesn't seem to be detected!

Here is the code:
Image

I've only got a touch object and a player in the layout with no any extra behaviors. I've even tried do recreate this in empty files and still can't make it work! Can you help me? What's wrong with my code?

Thanks!
B
10
S
4
Posts: 16
Reputation: 859

Post » Wed Feb 08, 2017 6:28 pm

Last two cases are both endless loops.

Take the 'set player directions' out of their respective events and put them in "on any touch end" or something.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Post » Wed Feb 08, 2017 6:58 pm

MPPlantOfficial wrote:Last two cases are both endless loops.

Take the 'set player directions' out of their respective events and put them in "on any touch end" or something.


Ahha! Now I understand! Of course it makes sense.

So the solution I went with: I added a short "System Wait" action to the beginning of both events to break the endless loop. This is so fun to learn!

Thank You! :D
B
10
S
4
Posts: 16
Reputation: 859


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests