I've been fiddling around and I managed to sort this out, in case anyone has a similar problem. I will try monkeys script and see how that handles, or I can just put the objects into the background and animate the background manually if I want to change anything with the objects - which I think will work better anyhow as the laser will be gone by then.
Within the game script
Code: ags
In repeatedly execute:
Code: ags
Works a treat except for the overlay thing
Within the game script
/* ---------------
RawDrawLine laser
------------------ */
// Extend Laser
RawSetColor(47104);
RawSaveScreen();
xpos = 212;
ypos = 22;
while (xpos > 59) {
RawDrawLine(212,22,xpos,ypos);
Wait(1);
xpos = xpos - 2;
ypos = ypos + 2;
}
// Set the timer (see repeatedly execute)
ypos = 173;
SetTimer(1, 25);
/*----------------------
End of RawDrawLine laser
------------------------*/
In repeatedly execute:
// Moves the laser beam in the background
if (IsTimerExpired(1)) {
if (ypos > 134) {
RawRestoreScreen ();
RawDrawLine(198,22,47,ypos);
ypos--;
SetTimer(1, 25);
}
}
Works a treat except for the overlay thing
