For some reason my control code won't work

For questions about using Classic.

Post » Sun May 24, 2009 11:42 pm

I'm trying to do this code for switching players and I have my code set up like this.


I'm looking through the debug and it isn't showing that I'm even pressing a button(which I base on because the value isn't adding) Perhaps I'm not doing the code for button presses right.

I've checked through the platforming school .cap and I can't understand what I'm doing wrong.

I've edited the image so it says "pressed" instead of down.

This isn't the problem I'm having the problem is the code for pressing the button just isn't working. I even tried saying On"Switch" pressed > Player1: Jump and that didn't do anything either. I also tried doing it with keyboard controls and it didn't work.
B
10
S
2
G
3
Posts: 7
Reputation: 1,344

Post » Mon May 25, 2009 12:13 am

It won't work like you expect if you use the 'control is down' condition. As you say it will keep adding 1 as long as it held, which will definitely mess it up, so you definitely want to use the 'on control pressed' condition.

Maybe if you post a .cap people can investigate what you've done more easily.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon May 25, 2009 1:03 am

I think I found out what's going on here. For some reason the code in my "Control" wasn't working. Turns out it wasn't included in the event list thing. Now I know. :D
B
10
S
2
G
3
Posts: 7
Reputation: 1,344


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests