Each newly spawned actor changes acceleration of previously spawned ones!

Hi fellow GSers,
So straight to the issue.

I'm spawning an actor called snowball.

The snowball prototype has an Accelerate in direction 270: with acceleration 200: relative to scene.

2 seconds later another snowball spawns and both snowballs seem to get "heavier".

2 seconds later a 3rd snowball spawns, and all 3 are super heavy.

Why isn't the acceleration applied to each individual snowball when it is spawned? Why does it seem to be additive to all snowballs spawned already?

Thanks!

Comments

  • ArmellineArmelline Member, PRO Posts: 5,370
    I just had a go at making what you describe, but I was unable to reproduce your problem. I did find it impossible to spawn an actor that accelerates downwards with acceleration of 200, and have it still be on screen 2 seconds later, though :P Using an acceleration of 100, I had multiple snowballs on the screen but each behaved exactly as expected.

    Bear in mind that an accelerate behaviour does just that - accelerate the actor's speed. So it'll get faster the longer it is moving. In my quick test, the first snowball would be moving considerably faster than the second when the second one spawned (as it had been accelerating longer).

    Perhaps try using another behaviour to move your snowball?

    Posting a screenshot of the rules you're using would definitely make this much easier to troubleshoot, though.
  • thumbfrenzylabzthumbfrenzylabz Member, PRO Posts: 50
    edited March 2014
    Thanks for your effort to try to recreate the issue! Here are a few screenshots:

    http://s9.postimg.org/okl3946jj/spawnsnowball.png
    http://s9.postimg.org/ocxgclvkv/snowballrules.png

    I'm applying Acceleration in direction 270 (down) at 200 for gravity. I have read several times that the preferred way to implement gravity is to use the Accelerate command.

    The strange thing is that it seems as though every time I spawn a new snowball it adds acceleration to all snowballs already spawned. I have a trampoline in the scene which bounces the snowballs up. The first snowball bounces normally, the second one bounces half as much and by the time the 3rd snowball spawns, all 3 snowballs are falling so fast that none of them bounce anymore..they just collapse to the floor and stick there.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    There's almost always an unlocked "instance" of an actor in these cases... something that you're not noticing that is affecting the rules. Any chance you can post a link to download your project file (.zip it first)?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • thumbfrenzylabzthumbfrenzylabz Member, PRO Posts: 50
    Let's see if this works:
    https://drive.google.com/file/d/0B81bzESwEOj5V3ZrNmhKUDVtd00/edit?usp=sharing

    I exported it and am attempting to share on google drive :)

    Thanks for taking a look :D
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    lol game name... I'll take a look.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • thumbfrenzylabzthumbfrenzylabz Member, PRO Posts: 50
    HEHEHE I'm glad you like the name :D Yeah its silly, I know!

    Thanks for taking a look... this game is about to make me go crazy... so many little bugs and work arounds and stuff... just when I think I'm making good progress I hit some wall like this :( About to give up on GS! OH NO! :(
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    So... the only thing I've figured out so far is that if I add a new actor and give it bounciness 1.25 just like the trampoline surface and check fixed rotation and uncheck moveable and put it in the path of the snowballs (below them), all of the snowballs bounce equally. So there's something about that trampoline surface actor.

    Maybe try re-creating it? Or even just deleting it and dragging it back onto the scene?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    In fact, as a test I deleted the trampoline, turned off the rules in the trampoline surface actor and set it to not moveable. Guess what? The snowballs all bounced to the same height. We're gettin' closer!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You're gonna like this! Turn off moveable in the trampoline surface actor. Aha!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • thumbfrenzylabzthumbfrenzylabz Member, PRO Posts: 50
    YES! TATIANG MY HERO! hehe.. Thanks for that :D

    I love that it is fixed.. I hate that it happened... but well that is "programming" sometimes :D

    Thanks again! It works

    BTW, what did you think of the game and setup in general? You seem well versed in GameSalad. This is my first project (which has turned into much bigger of a project than I originally intended). How am I doing? :P
Sign In or Register to comment.