Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: don_tomaso on Sun 20/03/2005 16:25:26

Title: um script problem
Post by: don_tomaso on Sun 20/03/2005 16:25:26
  // script for room: First time player enters screen
 
SetTimer(1,200);


if (IsTimerExpired(1)==1)
    {MoveObject(1,319,75,4);}
 

uh is there something wrong with this script ???  cause my object aint moving.. and I've checked object numbers so they match..                   Im quite new to scripting, but I thought this was how it was supposed to look
Title: Re: um script problem
Post by: Ashen on Sun 20/03/2005 16:29:58
Well, since you've just set the timer running, it's not going to be expired when you enter the room.
You need to move this part:

if (IsTimerExpired(1)==1)
    {MoveObject(1,319,75,4);}

into the repeatedly_execute script for the room.
Title: Re: um script problem
Post by: don_tomaso on Sun 20/03/2005 17:36:53
aha I see now, I only asked it once when the timer just started,  thanx, it's all so logical once you know the solution..