Simulating Ground Shake From Top-Down View

0 favourites
  • 10 posts
From the Asset Store
25 high quality isometric ground blocks + sprite sheet
  • What I'm attempting to do is use Z-Elevation to make an object appear to leap up above the layout and slam back down into the ground. THAT MUCH WORKS.

    The immediate effect following the object slamming into the ground is to make the layout scale down in size then "spring" back to its original zoom setting. The object hits with such a "force" that the effect is that it pushes the environment down away from the camera just a bit.

    The first half of this - "pushing" the ground away from the camera - which is to scale the layer smaller isn't working. I can't get it to progressively show the layer getting smaller. Instead, it appears as 0. Like it's not there. However, obviously, the Player object still moves around normally...just invisible.

    I've run some tests and I can set the layer to 0.5 through a separate action line. So it seems to be the way I'm trying to use the Tween that is the problem. Can someone help?

  • Add this action to the third event on your screenshot:

    Browser Log GreenGroundShake.ShakeTheGroundScale & " : " & LayerScale("Player")

    Open browser console and you should be able to see the value of ShakeTheGroundScale and the actual layer scale. Maybe this will give you an idea what's wrong.

  • Okay, I did that...hit F12 and selected the Console tab. But I don't see anything relevant. I checked through the other tabs, too, and didn't see where I could find the info that's supposed to be logged.

  • I discovered that, having set the Value of the Tween to the ShakeTheGround variable, the Tween goes from 1 to 0 even though I set the end value as 0.5. The Tween is completely bypassing the end value.

    I've reviewed the Tween behavior page in the Documentation and everything I'm doing seems to check out. So I don't understand why it goes from 1 to 0 and not 1 to 0.5 as I had set it.

  • Tween value becomes 0 when the tween ends. So you need to add "Tween is running" condition to that 3rd event.

  • Well THAT is something I wasn't aware of. That makes a whole lot more sense... *testing* ...and, well, it doesn't set the layer scale to 0. Now it just doesn't adjust the scale at all.

    I made a couple adjustments, including the one you suggested, but what I get is that the scale variable I use to track the Tween value still reads as 1 (the starting value).

  • The problem must be with some other event - maybe you are resetting ShakeTheGround boolean, or deactivating the group. Like I said, if you add console log to events key events, you should be able to figure it out.

    I tested and this works fine:

    .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I tried the Log Console deal and I couldn't find ANYTHING related to the log.

    But you were partially right - it was related to a variable issue. I re-worked it a bit and now it's all good.

  • For the console log to show anything, you need to add "Browser Log" actions to your events :)

  • Yeah, I did that but I couldn't find how to retrieve that info when I hit F12.

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