Rotate Cannon Randomly

iPhoneDevForMeiPhoneDevForMe Member Posts: 362
edited November -1 in Working with GS (Mac)
I have an issue! I would like to have a cannon placed in the middle of the screen at the bottom. Every couple seconds, I want it to rotate to a new angle between 45 and 135.

What I have set up is:

Timer - Every 2 seconds
--Rotate to Angel Random(45,135)
--Speed 500/5000

When I preview, 2 things happen:

1. When speed is at 500, it moves about 5 degrees every 2 seconds
2. When speed is 5000, it quickly jumps, but often at an angle that is outside of 45-135

I have been using the cannon demo and another cannon demo and I just cant seem to get this to work right.

I have gotten it to work great with "When mouse is down", I just cant make it right on its own!

Any suggestions?

Comments

  • FatalCrestFatalCrest Member Posts: 113
    Try using different speeds like maybe 2500?
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    Thanks for the suggestion FatalCrest! I thought this would actually work considering the speed seems to be changing the reaction, but after about 20 different numbers, it has the same results each time.

    I'm thinking rotate to angle is the issue for exactly what I am looking for. I will play around with a few different options and see what I can make work, if anything!

    Until then, any other ideas would be great!
  • FatalCrestFatalCrest Member Posts: 113
    Dang, have you seen what numbers come out of the random function?
    Use a text behavior and an replace random with an integer and just give make a rule
    somewhere that your integer = random(45,135). See what it comes out to be! xD
  • FatalCrestFatalCrest Member Posts: 113
    >.>
    <.<
Sign In or Register to comment.