Slow down time?

tcla75tcla75 Member Posts: 71
edited November -1 in Working with GS (Mac)
Hi what I am trying to do is have my Character pick up a power up that slows down everything the speed he is moving at all the other actors movements even the score which is time based. What would be the best way to do this?

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    Not sure how you can do the time.

    But to change 'speed' just make a rule that when game.powerupthatslowsdown (or whatever you want to call it) is = 1

    Change attributes...
    Change speed behaviors...
    etc.

    Then when the power-up-timer is over you can change game.powerupthatslowsdown back to 0 to return to normal speed.
  • tcla75tcla75 Member Posts: 71
    Ya it sounds like it would be a nightmare. Its a running game that I am making. He goes in one direction and if I did it that way I would have to also double the jump distance because the faster he runs the further he jumps. Also have fake parallax running in the background so would have to set up rules for that too. Thanks for the tip but would there be any easer one for all rule I could set up. Is it possable to just have the game slow down by half?
  • InLikeFlynnInLikeFlynn Member Posts: 171
    You could have a real attribute like 'speed' set to 1.0. Multiply all movement and counters by it. Then change the variable to '0.5' or whatever when you want to slow things down. That way everything runs as normal until you change the speed attribute.
  • tcla75tcla75 Member Posts: 71
    That sounds like it might work but how would I multiply all movement and counters by it?
  • tcla75tcla75 Member Posts: 71
    Bump
  • tcla75tcla75 Member Posts: 71
    Bump last bump I think :(
  • old_kipperold_kipper Member Posts: 1,420
    I think you could do this by having all rules related to movement set with a multiplying number by in a game attribute which each rule for each attribute would reference. Then by just altering the game attribute number you would alter the state of everything you needed.

    You may find that certain attributes would not be a simple multiplication of a base number as the reaction to friction, density, etc, and may have to be tested together to see how it all works out.

    hope that is at least of some help

    kipper
  • ORBZORBZ Member Posts: 1,304
    this is the wrong engine for a time manipulation type of effect. It CAN be done but you have to move everything yourself by hand, The BOX2D physics engine can not be used because it assumes a realtime clock and there is no way to adjust the clock speed. So if all your motion is using constraints or the Move behavior then YES, you can do it. But if it uses physics in any way then I would not recommend opening this can of worms.
  • tcla75tcla75 Member Posts: 71
    Thanks guys for the advice but I think I might leave it. I have a lot of actors on the screen all with their own attributes and this souds like it would be a nightmare to set up.
Sign In or Register to comment.