[Solved]Event wont trigger properly [Help please]

For questions about using Classic.

Post » Tue Jul 05, 2011 6:28 am

This event refuses to work on the first press of a control (I have to press it twice for it to start working, its weird)

Okay... So I have a private variable (guntype) on my characters "arm" - when I press X - it toggles the guntype to fire different bullets


default guntype value is 0

if X is pressed and the value is 0 - set value to 1
if X is pressed and the value is 1 - set value to 2
if X is pressed and the value is 2 - set value back to 0


That is the gist of it, but as I said above, it doesn't actually start changing the value until I press it the second time. AFTER I've pressed it the second time, it works like a charm, its just weird that I have to press X once with no effect, and only then am able to toggle the weapon properly.

Forgive me if I've made a really dumb mistake or explained my problem poorly, I just started seriously using the program a couple days ago.

Weapons Test <-- thats the cap, the 3 events that control toggling the private variable value are bookmarked at the bottom of the event sheet.
wgrace2011-07-05 23:18:33
B
3
S
1
G
1
Posts: 17
Reputation: 759

Post » Tue Jul 05, 2011 8:24 am

Here
http://dl.dropbox.com/u/24325446/weap.cap

What is more interesting why it worked second time.
First time it didn't worked because all events were executed in order
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Tue Jul 05, 2011 8:38 am

Thank you! =]

lol sorry my coding is so messy.
B
3
S
1
G
1
Posts: 17
Reputation: 759


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest