Rule Problem

crapscraps Member Posts: 353
edited November -1 in Working with GS (Mac)
I have an ball that bounces around in a sphere. Using the following Rules.

Rule (this is all inside one rule)
Att - game.crystalBall=1
Accelerate
Rotate
Collide/bounce when with BallWall
Change Attribute - game.slideCard to game.slideCard = 1.

SlideCard Actor
Att - gameSlide =1
Interpolate to position (x,y)
Change Att - game.crystalBall = 0

This all works - when the crystal ball is touched the game.crystalBall goes to 1 - the actor bounces around inside the crystal ball as expected.

My problem is - after the card slides into position (x,y) I want to change the game.crystalBall =0 so that actor stops accelerating and bouncing around inside the crystal ball.

But what happens is that when game.crystalBall = 0 the actor keeps accelerating and rotating to outside the confines of the crystal ball. ( the actor no longer collides with the ballWall.

Suggestions.

I need the actor to bounce around in the sphere until the card actor slides into position.
Then the actor needs to stop all movement.

Thanks

Comments

  • hotMagichotMagic Member, PRO Posts: 266
    So you want it to slow down and settle to a stop? Why don't you just interpolate its X and Y velocities over the course of a second or two to make it stop?
  • crapscraps Member Posts: 353
    Here are the Rules that I have working right now but I am unable to get the dice to stop accelerating and bouncing.

    Actor 1
    Dice Bounce inside the crystal ball.
    http://i54.tinypic.com/jzxqhu.png

    Actor 2
    Invisible box
    http://i52.tinypic.com/2nr3c7c.png

    Actor 3
    The sliding card
    http://i53.tinypic.com/muzmuw.png

    Actor 1
    To stop the dice
    http://i53.tinypic.com/rcvm3b.png

    The last rule - turning the crystal ball = 0 causes the dice to ignore the collide and accelerate rules and the continue to move beyond the "ballWalls'

    Any suggestions?
  • hotMagichotMagic Member, PRO Posts: 266
    I just did a quick lookover so i may be wrong, but it looks like your Actor 1 rule has the Collide with walls rule inside the place where you check that CrystalBall==1. So it's turning that part off when you get the Stop call. So couldnt you just place the collide rule outside of the CrystalBall==1 rule, by itself? That way they slow down but still collide.

    Is this what you want? For the dice to slow down, but still bounce as they slow?
Sign In or Register to comment.