Weird Result

0 favourites
  • 13 posts
  • Hey guys, I hope this was the right place to ask, but I'm having a not intended result with an event.

    With one of the animations frames of an animation I trigger a screenShake, and same screenShake is applied once the character lands.

    It works great, only problem is that is not working in the whole scene.

    I'm using for testing two objects with Solid applied. But shake works only on the solid in which the character is at the Start of the layout.

    Any ideas?

    Thanks in advance!

  • It's probably not a good idea to use a frame to trigger something since frames can be skipped.

    That is unless it's at the end of an animation.

    Timer behavior perhaps?

  • ah that could be a good solution!

    What I do is

  • Do it simple:

    https://www.dropbox.com/s/ctefw1x1zrzkx ... .capx?dl=0

    The layout's Unbounded scrolling property must be set to Yes, if you want it to shake on the sides.

  • Thanks 99Instances2Go indeed its simpler, but I still face the same problem:

    Shake works only on one solid but not on both.

  • I have no idea what 'landedState' stands for. And how you set or unset it.

    I have no idea if you change the animation when it lands on a platform.

    I have no idea if you have player_2 in a container with animPlayer_2 , so picking one would pick the other.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • -landstate is used to change the animations when landing. I use two different animations depending whether is a normal jump or power jump.

    -I dont change the animations on platforms, the animation is only changed depending jump type

    -no, animPlayer_2 is only pinned to player_2.

  • -no, animPlayer_2 is only pinned to player_2.

    Then that is your problem. You dont pick the player_2 that belongs to animPlayer_2.

    Can pick it by PinnedUID, i think.

  • Thanks! I should try that too. But this is getting weirder hahaha

    On the same solid object I can execute the action in one spot but not another, yet its the same object I'm jumping on. what the? lol

  • I was going to say make sure the other object is not on a layer that can't be moved (like a HUD layer) - I always accidentally put things on the wrong layer...

    But it could also be that the screen has no room to shake where the one object is (close to the layout edge). So, like 99Instances2Go said, if the layout is not set to unbounded, then you have to be far enough away from the edges of the layout for the shake to be able to scroll back and forth. (in other words, the edges of the layout have to be off screen)

  • I wrote some alternate plugins to help with this, if you want.

    http://blackhornettechnologies.com/cons ... oPLUS.aspx

  • ^^^ I like that more than 'unbound scrolling'.

  • Damn I was convinced I had it set to yes previously so like a moron didnt check it up when 99Instances2Go mentionned it.

    I owe him an apology hahaha

    It works perfectly now,

    Thanks guys!

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