How do I make a input-output in game mecanism

0 favourites
  • 5 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I've made some code that should open a door if a button is activated, depending on both's IDs.

    Here is the code:

    However, the code doesn't work as expected...

    In fact, it waits till all the lower IDs are activated to activate higher ones. Also, for the rotating doors, the door work randomly. Sometimes it does, sometimes, it doesn't.

  • Can you post a .capx file so that we will know what is the door made of to open or rotate. It will be a lot easier.

    And I think the event can be shorten once we know what it is.

  • If those are global events they will be on permanent repeat constantly checking, so each event will trigger when you change the value.

  • Try Construct 3

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

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

    Yes. In Construct all the subevents work at the same time. Not in order you put them.

    You should use "else" statement or "trigger only once" to get rid of the loop.

  • Didn't want to put a .capx file as there is a lot more code than just this, and it could have been disorentating. However here it is.

    (add in https)://mega.nz/#!l901XITC!-X0nNVQqgELUXHseqkmHBNAZ1nfeL9RlTqZwBfTueMU

    skymen

    Yes. In Construct all the subevents work at the same time. Not in order you put them.

    You should use "else" statement or "trigger only once" to get rid of the loop.

    What do you mean by this?

    This should not change a thing as each door has an ID set in a variable, and each button also has an ID. So when the button's ID is equal to the door's ID, and if the button is activated, it should open the door.

    Anyway, I'll try adding a "Trigger once while true" condition to see if it works.

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