increase speed for a time Help

tiestotiesto Member Posts: 122
edited September 2012 in Working with GS (Mac)
hello everybody
si i want to know how can i increase my actor speed for a time when i touch an other actor
for exemple:
my actor speed motion.vellocity.x= 400
so i want every time that i touch an x actor my speed player up + 20 for 5 secondes
Thanks

Comments

  • tiestotiesto Member Posts: 122
    Help me please
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited September 2012
    Create a boolean game attribute called 'speedMeUp' and set it to false.

    In your 'other actor' create a rule that says when touched change the attribute 'speedMeUp' to true

    In your moving actor create a rule that says when 'speedMeUp' is true change motion.velocity.x to 420

    Include a timer that says (after) 20 seconds change motion.velocity.x to 400
    and change 'speedMeUp' back to false
  • tiestotiesto Member Posts: 122
    I think That you dont understand me for exemple: my actor speed is 400
    And every time i touch my actor his speed up +20
    For exemple if i touch it tow times his speed: 440
    Three time
    Speed: 460
    Thanks
  • famekraftsfamekrafts Member, BASIC Posts: 834
    on touch release, make speed attribute say attribute "speed" = speed + 20. so if by default you gave 400 it will add 20 every time you touch and release the screen. If you give only touch pressed, till the time it is pressed it will keep adding + 20. so use the touch release instead of touch pressed.
  • tiestotiesto Member Posts: 122
    sorry eduard0369 can you give the gamesalad snow leopard version for the project
  • tiestotiesto Member Posts: 122
    and wickedsunny i want that this 20 that i add to the speed delete after 20 secondes
  • Yovanny369Yovanny369 Member Posts: 105
    Creates a rule that says when "self.Motion.Linear Velocity.X > 400"
    set a timer "after 20"
    then Interpolate Behavior "self.Motion.Linear Velocity.X to 400 set Duration 1 or 0.5"
  • tiestotiesto Member Posts: 122
    and i can't do a think like :
    speed=real=400
    attribut speed+ 20 when i touch it
    and put a timer after 20 secondes attribut speed-20
  • Yovanny369Yovanny369 Member Posts: 105
    edited September 2012
    You can do that. All depends on what you want.
    The meaning of my rule is that when the speed is increased after 20s are back to "400" no matter how many "20" is added.
  • tiestotiesto Member Posts: 122
    yeah but me i put an attribut that say every 5 secondes my speed up+20 me i want when i touch an other actor my actor speed increase+ 10 for 10 secondes
    so i don't want to recame to 400 speed because my first attribut give me +20 every 5 secondes and i don't want to lose them.
    i want to lose +10 after 10 secondes.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    If you keep changing your design specifications you are just going to frustrate people and they are going to give up on helping you. Please take a look at your first post and then compare it to your last post. Do you see the difference between what you originally asked and what you are now asking?

    Please post exactly what you want -- in complete detail. An then stick to it!
Sign In or Register to comment.