Frustrating!!

charliehgreencharliehgreen ArizonaMember Posts: 233
Ok, I know that there's a couple threads about this, I tried them out and can't get it to work.
I'm creating a power up that basically when you use it, it'll pause only the enemy actors for X amount of time.

I created an interger called "clock" and once you click on the clock power-up (actor) in game, it'll change game.Clock to 1

Then on the enemies I have a rule that says
-Attribute game.Clock = 1
-Constrain Attribute Self.Motion.LinearVelocity.X to 0
and the same for Y

Ughhh! lol how can I freeze/pause my actors for 3-5 seconds? :(

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    On the clock power up actor add the following underneath the change attribute where you are setting game.Clock = 1

    Timer: After random(3,5) seconds
    Change Attribute game.Clock = 0

    If random doesn't work on the timer set another attribute with a random number and use that on the timer
  • GamepencilerGamepenciler Artist/Game Developer Member, PRO Posts: 326
    Sounds very informative, I'm actually learning by reading posts like these.

    Artist/Game Developer / Animator at your service..

  • charliehgreencharliehgreen ArizonaMember Posts: 233
    edited September 2013
    KevinCross
    Nope, still don't work. The freaking actors won't stop moving :(
    I just want to make a time stop power-up *Cries* lol
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    I thought it was the timer bit that you was having trouble with.

    I think when I froze my balls (>.<) in Doodle Kicks after pressing a pause button I also constrained the X and Y position. I can't check at the moment
  • charliehgreencharliehgreen ArizonaMember Posts: 233
    @KevinCross
    hahah well however you managed to freeze your balls, I would love to know how you done it exactly one you have time to check. Lol man I've been on this all day :(
  • VolontaArtsVolontaArts Member Posts: 510
    edited September 2013
    wouldnt you need another attribute that controls all the enemies rules....lets make this attribute called enemymovement(wrap it over all enemy rules you want to stop)

    basically when

    attribute.game.clock=1
    change attribute game.enemymovement=false

    so this should be added with all that u said in the first comment.
  • charliehgreencharliehgreen ArizonaMember Posts: 233
    @RedeyeArts

    What do you mean by "Wrap it over to all enemy rules you want to stop"?
    How do I go about do this?
  • charliehgreencharliehgreen ArizonaMember Posts: 233
    @RedeyeArts You Freaking genius wheeeeeeeeew I got it. Thanks man!!!! Love ya!!!!
  • VolontaArtsVolontaArts Member Posts: 510
    nice, glad i can help since so many others helped me lol
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Is that working? And are the enemies carrying on with their original velocity after the 3-5 seconds? I looked at mine and I noticed that to get it to continue with the same velocity it was going at before it was paused/frozen I had to store the velocity into self attributes before setting them to 0. I created a mini project for it but if you've got it working fine then cool
  • charliehgreencharliehgreen ArizonaMember Posts: 233
    @KevinCross
    Yeah It's working, I did a little of my own tweaking but @RedeyeArts definitely got the job done. :)
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Coolio
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yes remember this is code. If you don't lockout the other move, accelerate rules setting motion to zero will not stop movement. Remember the computer does what you tell it.
Sign In or Register to comment.