Bounce into Existence (new v2) - Simple drag and drop code to bounce actors into existence.

StormyStudioStormyStudio United KingdomMember Posts: 3,989
edited March 2014 in Community Tutorials

EDIT: THIS HAS BEEN UPDATED AFTER THE ORIGINAL ANNOUNCEMENT, ITS NOW EVEN SIMPLER TO USE.

Here's a tidy bit of code for making you actors bounce into existence.

I've really tried to scale back the needed rules and attributes to the bare essentials so it's easy to reuse and add into projects.

no new self attributes are required at all. (Unless your using physics with the actor, in which case you should use my older 'bounce version 1' code, which is also included in the project file below. The older version requires the making of 3 self attributes but offers a little more control).

Here's a vid showing the new Bounce v2 in action and a quick run through of how to use the code/rules/script.

This link is to the obsolete video I made yesterday which is a walkthrough of the old version which has some benefits like extra control and would not effetc your physics settings.... but really check out version 2 above for quicker applying of bounces.

It's made using the Release Candidate 11.0.0.0.0.0.1. So if your using this in the future and a stable build of 11 has been released you'll need to change the project extension to .gameproj .... also hi there in the future... say hi to future me if you see me around.

Also if your interested in this you might want to check out RThurmans other bouncy scripts he shared in the Spare Code thread back on page 5. They give you a few other options to build on too.

Project Version 2 attached below..

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    Thanks for the awesome...

    Tiny little 'bump' before I let this disappear into the world of obsolete forum threads :-)

    I might still work on a way of doing this with out using any self attributes at all. Some how just using the game time might be do able.. though probably not... need to think on it.

    If it was we could save the set up as a custom behavior and drop it onto any actor and it would work without showing up an errors or requiring any work.

  • zweg25zweg25 Member Posts: 738
    edited March 2014

    very cool @StormyStudio‌

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    edited March 2014

    Just completly remade this.

    You can now copy and paste the tidy rules to any actor and it will bounce into existence without the need for any new self attributes at all, so no broken rules when it's applied... it just works.

    Video and file on its way shortly.

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    Here's the new Bounce script.

    IT JUST WORKS

    I've added this video, and the file to the first post in this thread.

    Enjoy.

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    Very cool work @StormyStudio‌ I'll be using this for sure. Thank you.

  • neomanneoman Member, BASIC Posts: 819

    @StormyStudio Thank you very much ... Will come in handy :-)

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    Glad to help.

    if you use it on buttons that scale their width when pressed (rather than a change image) you might want to put the 'bounce into existence' group of rules inside a rule that controls when it happens.

    I've just used a rule that says

    if self.time < 2
    'bounce into existence'

    This makes my buttons bounce the start of the scene and then I can continue with my normal button press rules without having to fix anything... or make any more attributes.

    Obviously there are load of ways to achieve the control of when it happens but I like self.time.

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    edited March 2014

    bounce.. :-)

    You can see the bounce in action at the start of my recent async video:

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,270

    Ah! Very very nice, Jon! Thanks for sharing with the community!

  • LumpAppsLumpApps Member Posts: 2,880

    Hi Stormy, this time in the right thread ;)
    Here is my version using constrains and sin. It uses interpolate in the end to go back to its original size. The trick of using existing attributes is awesome.

  • vafurlogivafurlogi Member, PRO Posts: 203

    It seems that the new RC (11.0.8) has broken this. The smooth bounce now stutters and acts all weird.

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    Hmm that's annoying. I'll take a look later (or after easter weekend) .

  • TaoOfSaladTaoOfSalad Member, Chef Emeritus Posts: 83

    The issue is really with = (equal) and =/= (not equal) in rule conditions. I can see how the fix we made to interpolate might cause this.

    When working with real attributes like those of size and position, stick with <, <=, >, >=. Mixing with equal and not-equal can cause weird things because those operators use approximation.

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    Ahh ok I'll revisit the code later...

    (I'd just submitted it as a bug to see if it was a bug in the RC or needed fixing).

    Thanks

    Jon

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    Cool ... fixed... instead of using the 'NOT EQUAL TO'... I've changed it so if the self size width if either < or > the target it does something... so essentially it's doing the same thing.

    Updated Project Attached to this comment.

  • SilverAlmightySilverAlmighty Member Posts: 17
    edited August 2014

    Hi there

    Im really interested in this and Im having some trouble installing it (Im not using pro version, My version is 0.11.1.11 beta). So if you mind could send me a picture of the behaviours so I could recreate it in my own games? Thanks for creating this!

    EDIT: I Figured the issue out, just some file bugging, Btw... THIS IS AMAZING!

  • Wonder MaruWonder Maru Member, PRO Posts: 98

    @StormyStudio said:
    Cool ... fixed... instead of using the 'NOT EQUAL TO'... I've changed it so if the self size width if either < or > the target it does something... so essentially it's doing the same thing.

    Updated Project Attached to this comment.

    Hey hello! I tried to use this, but probably since the various updates in GS since last time you updated this, it doesn't work. I change the file extension as you said above (and hello from the future :) hope you're well) and GS crashes everytime.
    Hope you can help, thanks!

    Wonder Maru: casual games for casual people. www.wondermaru.com

  • 8bitninja8bitninja Member Posts: 367

    Thanks, @StormyStudio - This is awesome!

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Anyone have any issues with the "Bounce into Existence" effect, using GS 1.25.54?? I seem to get a stuttering bounce effect, rather than a smooth bounce like in previous versions of GS... Any help/guidance would be greatly appreciated :) Thanks!

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,877

    Yes its got a little stutter to it now.

    Here is a different way that @Socks suggested:
    http://forums.gamesalad.com/discussion/comment/446623/#Comment_446623

    And a couple more comments down is an another different way that I suggested:
    http://forums.gamesalad.com/discussion/comment/446636/#Comment_446636

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @RThurman Thanks for the quick feed back :) I'll give these a try tonight!

Sign In or Register to comment.