Help! Fade out problems! (Experienced users necessary)
chosenonestudios
Member Posts: 1,714
Hey, guys I've tried everything I know how to do do and I can't get this to fade in and out consistently can you please take a look at this for me:) thanks!
Button Holder = Actor (That I want to fade in and out)
Button Holder =2
Press Pause button --> change button holder --> 0
button holder =0 than do... for .75s change growth by 5.... Move to 160,240 at a speed of 255 (run to completion)
Press Resume button --> change button holder --> 1
button holder = 1 than for... .75s change growth by -5.... Move to 160,240 at a speed of 255 (run to completion)
Then you would press the pause button again and the whole thing should loop, but it doesn't work the second time:( (but yes it does work the first time)
If you figure out the error in my logic, help would be much appreciated! Thanks in Advance!
-Will
Button Holder = Actor (That I want to fade in and out)
Button Holder =2
Press Pause button --> change button holder --> 0
button holder =0 than do... for .75s change growth by 5.... Move to 160,240 at a speed of 255 (run to completion)
Press Resume button --> change button holder --> 1
button holder = 1 than for... .75s change growth by -5.... Move to 160,240 at a speed of 255 (run to completion)
Then you would press the pause button again and the whole thing should loop, but it doesn't work the second time:( (but yes it does work the first time)
If you figure out the error in my logic, help would be much appreciated! Thanks in Advance!
-Will
Comments
I multiplied the original value by 5 and then multiplied that by -5..... that wouldn't fix anything... sooo take the original value and multiply it by 5.... and then all you would have to do is divide it by 5.....
SOOO THE QUESTION OF THE DAY IS How would we divide that number by 5...
I just thought about it and you could multiply it by .2 .... but I don't know how to A. take the value and divide it by 5 or B. take the value and multiply it by .2...
So if you know how to do this or a different way to do it your help would be appreciated! Thanks in Advance!
-Will
original......button holder = 1 than for... .75s change growth by -5
fixed..........button holder = 1 than for... .75s change growth by -1
Thanks guys anyway.... Well I hope this helped someone else haha
-Will
Create an integer attribute - game.loop for example. set it to 1
Either on a timer or when a button is pressed etc.
change attribute game.loop to game.loop*-1
Then have rules when game.loop = 1 do action 1
When game.loop=-1 do action 2
So for a pause system
When touch is pressed (in pause button actor)
change attribute game.pausebutton to game.pausebutton*-1
New rule
when game.pausebutton = 1
change image to paused
stop everything...
when game.pausebutton = -1
change image to play
restart everything...
so now everytime the pause button is pressed it switches between a value of 1 and -1
Here is my post (with a simple and processor efficient working solution) to someone with the same issue today: http://gamesalad.com/forums/topic.php?id=4439
The same above logic sequence will easily work for width and height (with subtle modification) in lieu of alpha values.
If this isn't your problem...then I would redefine your problem better because it is confusing to most of us as to what you are trying to do.