hello friends I'm making a game and I have a problem, the main actor is a ship with animation included, I want you when you pick up a power switch for a few seconds of animation, anyone know how to do this?
no, I have been a few months with gs and the truth thanks to increasingly understand lordtarantor better and I do not need help, I have seen all the videos and gshelper gs, I have not understood my question, such as;
I want to do;
power up collide with actor, Actor animation changes
Hey Rupas this might work for you Create a game attribute (integer) and call it PowerUpOn Then in your powerup have a rule when overlaps or collides with ship change attribute PowerUpOn to 1
Then in your ship Have a rule When Attribute PowerUpOn = 1 Timer (for ten seconds or how long you want) Animate (your ship with power up)
In Otherwise Timer (after ten seconds) Animate (your ship without power up) Change attribute PowerUpOn to 0
I havent tested it but i think it should work I'm not sure if you need the timer in otherwise but try both ways
skippy said: Hey Rupas this might work for you Create a game attribute (integer) and call it PowerUpOn Then in your powerup have a rule when overlaps or collides with ship change attribute PowerUpOn to 1
Then in your ship Have a rule When Attribute PowerUpOn = 1 Timer (for ten seconds or how long you want) Animate (your ship with power up)
In Otherwise Timer (after ten seconds) Animate (your ship without power up) Change attribute PowerUpOn to 0
I havent tested it but i think it should work I'm not sure if you need the timer in otherwise but try both ways
if it works! but after 10 seconds does not return to normal, how I can fix this?
Comments
Then drag in the animate behaviour.
Problem sorted!
Cheers.
Double click on your actor in the inspector (the bit where all the actors are 'stored')
Create rule
Actor receives event - overlaps or collides - actor of type - Ship
Drag the behaviour Animate into the rule.
Add the animation frame by frame to the animation and set the FPS.
Hope this helps
p.s. If you have just started out check out The cook book videos and then as you progress check out gshelper.com
Cheers.
I want to do;
power up collide with actor, Actor animation changes
Create a game attribute (integer) and call it PowerUpOn
Then in your powerup have a rule when overlaps or collides with ship
change attribute PowerUpOn to 1
Then in your ship Have a rule When Attribute PowerUpOn = 1
Timer (for ten seconds or how long you want)
Animate (your ship with power up)
In Otherwise
Timer (after ten seconds)
Animate (your ship without power up)
Change attribute PowerUpOn to 0
I havent tested it but i think it should work
I'm not sure if you need the timer in otherwise but try both ways