[Solved]Event wont trigger properly [Help please]

This forum is currently in read-only mode.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here

    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

  • Thank you! =]

    lol sorry my coding is so messy.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)