It sounds so trivial but somwhow i cant really figure it out.
I have some lightning in my backgrounds. It appears, animates. disappears and waits for a certain amount of time before it starts anew. While doing that I want the player to still be able to move around (all the time) so that if hes on a certain hostspot and lightning is visible i can trigger something.
It seems impossible or at least extremely complicated to do. Unless I'm missing somethin. do I?
I don't get the problem. Why don't you use a timer?
^^
Thats what I did ^^
Sorry I need to get some sleep.
Here's how I solved it:
function room_RepExec()
{
if (IsTimerExpired(2)) {
ohigh1.Visible = true;
oblitz1.Visible = true;
oblitz1.Animate (0, 5, eOnce, eNoBlock);
SetTimer(1, 20);
SetTimer(2, 70);
}
if (IsTimerExpired(1)) {
ohigh1.Visible = false;
oblitz1.Visible = false;
}
//-----------------------------
if (Hotspot.GetAtScreenXY (player.x, player.y) == hblitz1 && oblitz1.Visible == true && Death == 0) {Death = 1;}
//------------------------------
}
For lightning effects, the animating room background feature can also be used. Just draw the lightning on the required background frames and adjust the animation speed. You can find it in the AGS manual under Animating background scenes.