How to stop a movable object definitely?

krousty_batkrousty_bat Member Posts: 48
edited November -1 in Working with GS (Mac)
Hi everyone

My scene's physic has been turned off to 0,0.

I have a square falling from the top
for this, I just change attribute Self.velocity Y to -400

A rule is telling When on contact with ground or square, CHange attribute Movable to 0.
(I try the same rules with Change Self.velocity Y to 0 and it will make the same problems).
the piece is stoping, everything is working fine :).

THEN, a second SAME piece (same rule, ) is falling on top of this one.
Despite getting the rule, the second square is getting a bounce, a small speed inverted and starting to go up.

THEN, a third SAME piece (same rule ) is falling on top of this one.
Despite getting the rule, the third square is getting a bounce, and second piece is now bouncing back down.

My questions is simple

* First Why the hell those pieces are bouncing, they have a value of Zero, NOTHING i'm coding is telling them to get a different Velocity Value, Physics is off, Moveable is set to 0 does not make any sens :).

* How can I tell an object to move, stop, and being from now on a non moveable objects.

thx.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Movable is not able to be changed while in play. You can set velocities to 0 and you can also constrain it to a position
  • krousty_batkrousty_bat Member Posts: 48
    (..) Movable is not able to be changed while in play (..)

    Woaw, thx, that's pretty important to know (it should be explained somewhere :)...
    and weird, Why then the option is selectable in the attributes optoins if it's not to be able to change it in game ? :).

    Thx for the Constrain Idea, I'll try that for the Velocities to 0 as explained did not worked either and create the same problems.
  • krousty_batkrousty_bat Member Posts: 48
    (..) Movable is not able to be changed while in play (..)

    and Btw, I'm using a "display Text" on top of my squares, and even if it's not doing anything technicly, it's definitly changing the attribute from True to False on contact... :)
  • RodericRoderic Member Posts: 145
    You can get them to stop bouncing by changing the restitution to zero or something like .1. Try that and see how it works for you.
  • krousty_batkrousty_bat Member Posts: 48
    Thx Roderic, but my restitution was always to Zero and boucing they still do, hehehe :)...
  • krousty_batkrousty_bat Member Posts: 48
    To kinda close this
    My Error is that I should have used a "constrain attribute" and not a "change attribute".

    I still have some small bounces on Collision (does not break anything so far, so I don't care), But I still think it's weird that I am not able to "simply" Flag an object from "Movable" to "NOT moveable" in game.

    I can probably destroy my movable objects after saving the X Y values and spawn an unmovable objects at the same X Y values too, but that would be some weird way to replace this function (FOr I read several time Kill and Spawn is not to use too much in terms of performance...)

    Thx.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    You can try changing the max speed to 0 or you can spawn a clone of the actor that is non-movable and destroy the movable actor.
  • ozboybrianozboybrian PRO Posts: 2,102
    I have a similar issue with setting an item from not visible to visible and visa versatile.

    You think you'd be able to go change attribute > Game > graphics > visible on/off
    Same with game>motion>moveable>on/off
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yeah visible and non visible cant be change just like movable.

    You can change its self color alpha to 0 in game and then change back to 1 to make it invisible and visible though
  • ValanValan Member, BASIC Posts: 410
    If the Drag is set to over 50 it can cause the actor to jiggle rather than slowing to a complete stop. I set a display text on the actor to see the x,y velocity values. It read very fast changes in opposing directions.
Sign In or Register to comment.