Picking Problem

0 favourites
  • 1 posts
  • I'm creating a puzzle platformer where putting a box on a button will trigger other puzzle elements to activate as long as the box remains on the button. For example, one button turns on a light while another opens a door. This works by having every object in the Triggerable family have an instance variable storing the UID of the Trigger object that activates it. Buttons are Triggers, Lights and Gates are Triggerables. Carriables are anything (like boxes) that can be carried and placed on a button.

    However, no button will activate if there exists a button already activated. I can't figure out what the problem is. I think it has something to do with picking, but I'm not sure. I'm certain the problem lies here:

    <img src="http://rhetoricstudios.com/uploads/help0.jpg" border="0">

    Logic in question

    <img src="http://rhetoricstudios.com/uploads/help1.jpg" border="0">

    No buttons activated. Note that the buttons are labeled by their UID and the door/lights are labeled by the UID of the buttons that trigger them.

    <img src="http://rhetoricstudios.com/uploads/help2.jpg" border="0">

    A box is put on one button, triggering the light.

    <img src="http://rhetoricstudios.com/uploads/help3.jpg" border="0">

    A box is put on another button, opening the door.

    <img src="http://rhetoricstudios.com/uploads/help4.jpg" border="0">

    One box is placed on the door button, then another box is placed on the light button. However, the light button does not activate.

    The capx file is here.

    ASWD moves the character. Space jumps. E picks up and drops boxes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)