Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: WackyWildCard on Fri 27/01/2006 02:09:50

Title: Question Regarding AGS Adventure Game Timing...
Post by: WackyWildCard on Fri 27/01/2006 02:09:50
 ???

AGS Staff and Fellow AGS Forum Members:

I first want to say that this Adventure Game Studio is a radical program, and I am having hours of fun design my Adventure Game on it!

However, I was wondering if someone could give me some simple technical advice (for my simple mind) regarding Adventure Game Timing. What do I mean?

Y'know in certain adventure games where the hero is underwater and holding his breath, and only has a limited amount of time to reach the surface before he expires? Or perhaps he is confronted with a vampire or a werewolf (e.g. King's Quest II) and the hero has a limited amount of time to act quickly or the monster will kill him!

I want to be able to add those kind of features to my game, so the hero has a limited amount of time to act or (kkkeeech!!!)

Could someone in the AGS Staff orplease give me some step-by-step instructions for making time limites in AGS Games?
???

I would really appreciate it!

Thanks!

Wacky Wild Card
Title: Re: Question Regarding AGS Adventure Game Timing...
Post by: monkey0506 on Fri 27/01/2006 02:37:47
I'm kind of distracted at the moment (I'm actually about to go to bed), but you might want to look at these:

SetTimer (http://www.adventuregamestudio.co.uk/manual/SetTimer.htm)
IsTimerExpired (http://www.adventuregamestudio.co.uk/manual/IsTimerExpired.htm)
repeatedly_execute (http://www.adventuregamestudio.co.uk/manual/TextScriptEvents.htm) (a little more than 1/2 way down)

Set the timer when the timed event starts (i.e., the player enters the room full of water), then check whether it is expired in repeatedly_execute (rep_ex) with something like:

// in rep_ex
if (IsTimerExpired(TIMERNUM)) {
  Display("ARG!  I've died!");
  }
Title: Re: Question Regarding AGS Adventure Game Timing...
Post by: WackyWildCard on Sat 28/01/2006 20:00:52
Thank You for taking the time to give me some helpful advice!

I will find the information provided useful.

(Though I wish there was a feature in AGS that enabled Timer settings without scripting knowledge.)

Title: Re: Question Regarding AGS Adventure Game Timing...
Post by: monkey0506 on Sat 28/01/2006 20:32:04
Well, I've looked and I can't find any previously suggestions for this, so you can suggest it in the Technical Forum (http://www.adventuregamestudio.co.uk/yabb/index.php?board=2.0).  Just create a new thread with "SUGGESTION:" in the title.  Perhaps something like "SUGGESTION:  Interaction editor timers" or some such.

And I'm glad you found my suggestions helpful.