Shake effect without scrollto?

0 favourites
  • 6 posts
From the Asset Store
A total of 214 high quality and unique magic sound effects suitable for RPG, Battle Arena and more!
  • Is there an easy way to get the shake effect without the scrollto behavior on an object?

  • if you have a lot of objects on screen and want all of them to shake, I don't think so, But if you only want to shake one object (or one family):

    store the actual position of the object in variables.. then use a loop and set the postion to the variable +- random()

  • set the scroll manually using events?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So the answer is no then?

  • yeahhhhh~ the sticky topic helps a lot. it has some awesome stuff in there.

  • Thanks everyone. For anyone that may be having this issue I was able to come up with the following solution.

    1. I made a 1x1 sprite and gave it the scrollto behavior, which I set to disabled, and the timer behavior. I also made the sprite invisible by default.

    2. In the event sheet I set the sprites position to my games camera position (your normal scrollto coordinates). You can trigger every tick but I just trigger it as needed since the default scrollto behavior for the sprite is set to disabled anyways.

    3. In the event sheet set up your trigger for when you want the shake to occur. For me it's if a specific animation is playing. On trigger, set the sprites scrollto behavior to enabled. Add the shake event to the same trigger. Add a timer to the same trigger and set the time to the same amount of time as you set for the shake duration.

    4. In the event sheet add a timer trigger so when the timer is finished it sets the sprites scrollto behavior back to disabled.

    This worked perfectly for me with a short shake duration (0.4 seconds). I'm not sure how well it would work for long durations but it works great for what I need.

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