Indefinitely long ShakeScreenBackground (SOLVED)

Started by markbilly, Tue 24/08/2010 12:51:30

Previous topic - Next topic

markbilly

Basically, I want the ShakeScreenBackground to keep going indefinitely until I abort it manually (by setting length to zero) how would I do this?

I have looked through a few threads but nothing has come up...
 

Calin Leafshade

if you cant find a solution for ShakeScreen you could make the room a little bit bigger and mess with the viewport instead


tzachs

Try running the background shake in small amounts in the repeatedly execute (but long enough to be carried until the next repeatedly execute), for as long as a certain boolean variable is true. Then when you want to stop the shaking, mark the variable at false.

Something like this:

Code: ags

bool ShakeScreen;

//when you want to start the shaking put
ShakeScreen = true;

//in repeatedly execute
if (ShakeScreen) ShakeScreenBackground(...);

//in some other function when you want to stop it:
ShakeScreen = false;


I haven't tried it but is should work.

markbilly

 

SMF spam blocked by CleanTalk