floor switch order logic

0 favourites
  • 4 posts
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • Hi all,

    I've been trying to work out the logic for the below and cant figure it out, help would be greatly appreciated

    I have 1 instance object that i use as a floor switch.

    It has 2 frames, 0=not activated, 1=activated

    I have 4 of these in a line left to right on the floor

    The switches must be activated in the correct sequence to open a door.

    When the user stands on 1 of the 4 switches it frame value changes to 1

    User overlap switch then set switch frame to 1

    The logic is like this(which does not seem to work)...

    If user overlaps switch then set switch frame =1

    If switch UII=122 and frame=1 then set (value)=active

    If switch UII=123 and frame=1 then set (value)=active

    If switch UII=124 and frame=1 then set (value)=active

    If switch UII=125 and frame=1 then set (value)=active

        

    If switch UII=122 and frame=1

    If user overlap switch and switch UII=123 then (value)=active

    If switch UII=123 and frame=1

    If user overlap switch and switch UII=124 then (value)=active

    If switch UII=124 and frame=1

    If user overlap switch and switch UII=125 then (value)=active

    If switch UII=122 and(value)=active

    If switch UII=123 and(value)=active

    If switch UII=124 and(value)=active

    If switch UII=125 and(value)=active If then set door frame open

  • LI0NHART

    Hi

    Not sure if this is what you want..

    Floor Switch

  • exactly what i'm trying to do that a lot spongehammer :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No Problem. Glad to be of help <img src="smileys/smiley1.gif" border="0" align="middle" />

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