LumensAquilae's Recent Forum Activity

  • So for anyone interested I found a workaround for this issue.

    On top of having a target UID for each trigger, I also added a variable for Channel. I used a default value of 1, but could go as high as the target had inputs.

    In each target item I then added three variables for In1, In2, and In3. This allowed me to have up to three items triggering the same target, but it could be only two depending on your needs.

    I then modified my events so that each trigger is sending a 1 or a 0 to UID.Channel#. Each target then had an event that summed all of the 1s and 0s being sent to it and would be off if the sum was 0, or be on if the sum was greater than 0.

    This did the trick and allowed me to have multiple triggers sending off or on triggers to the same target without that target wigging out.

  • That sounds similar to what I'm already doing.

    The issue arises when I have two pressure plates pointing at the same door. So for example player1 has to stand on a pressure plate to open the gate and let player2 through, but player2 can't follow through the gate until player1 locates another pressure plate to hold the door open so both can proceed. In these cases you have one door being referenced by two plates, one sending an Off signal, the other sending an On signal. If both pressure plates are off, the door animates correctly, if both pressure plates are on, the door animates correctly, but if there is any mix of on and off then the animation sticks.

    I've uploaded a stripped-down example of what I'm working with here: http://www.silvite.com/crap/PressurePlates.capx

    And thank you for your replies, I do appreciate the help.

  • I've tried that, but it only functions properly if I have a single target in a layout. If I add a second pair of a pressure plate + door then only the first one will trigger and any additional sets will stick in the default state.

  • So I'm trying to create an OR gate situation with pressure plates. My current system worked until I started replacing the placeholder graphics with animations. My current system works like this:

    Each Pressure Plate has an instance variable that defines a target door by UID. When that pressure plate is weighed down it will pick the door by UID and call a function that "opens" the door by disabling the collision and changes the animation. That means it also needs an opposite event that processes for pressure plates that are no longer weighed down like so:

    For Each [Pressure Plate] (and) [Pressure Plate] is NOT overlapping [Weight] = Close [Door], change animation

    For Each [Pressure Plate] (and) [Pressure Plate] is overlapping [Weight] = Open [Door], change animation

    The order of these events meant that open doors were processed last and everything worked well, then I added animations and realized that I had one huge problem. The nature of game means that I often have two pressure plates triggering one door, it is kind of a cornerstone of the puzzle design. Because of the way these events are processed my animations are triggered every single tick any any situation where I have two pressure plates that aren't on the same state. Even if I use a Trigger Once event it doesn't mean anything because the door is technically being disabled and then enabled in the next line in the same tick.

    So that is where I'm at. This isn't a true OR gate since the signal is really just flickering, and I've been trying to find ways to abstract the events in whatever way to break this on-off flicker. I'm just having a really hard time figuring out a method, I'm sure there must be an easy way about this too.

  • Try Construct 3

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

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

    On Animation Finished trigger fires while last frame plays instead of when it finishes.

    Attach a Capx

    http://www.silvite.com/crap/AnimationExample.capx

    Description of Capx

    This project is a simplified version of a concept I'm using for climbing ladders or vaulting over walls in my game, simplified to two events. When the movement is triggered (in this case by pressing Space) the game triggers the animation "Move". The second line is "On Animation "Move" Finished" which then moves the sprite to the position that the animation ended up, in the game that would be wherever the character climbed to. However, the event seems to be triggering -while- the last frame plays and causes animations to flicker between states.

    Steps to Reproduce Bug

    • Step 1: Trigger an animation "Example"
    • Step 2: Create a "On Animation "Example" Finished" trigger that moves the sprite.

    Observed Result

    The sprite moves into the new location before the animation finishes and causes the sprite to appear in the wrong location until it sets the animation to default.

    Expected Result

    The "Move" animation would play in its entirety before triggering the event, resulting in a sprite that appears to have seamlessly moved.

    Alternate Repro

    • Step 1: Create a sprite with two animations, "Green" and "Red".
    • Step 2: Create event: On keypress: set sprite animation to "Red" and set sprite invisible.
    • Step 3: Create event: On animation "Red" finished: set sprite animation to "Green" and set sprite visible.

    Observed Result

    The sprite will remain green, pressing control will make the object invisible but then it will flicker red for a frame after becoming visible and before turning green again.

    Expected Result

    The sprite would only show green, the red frames would never be visible.

    Affected Browsers

    • Chrome: YES
    • FireFox: Untested
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 Home Premium SP1

    Construct 2 Version ID

    r212.2

    This alternate example has less practical use but is an easier example to show the events playing before the animation has finished.

    I've tried working around this by ending my animation with a blank frame but this just causes the character to flash invisible.

LumensAquilae's avatar

LumensAquilae

Member since 23 May, 2014

None one is following LumensAquilae yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies