Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: KrisMacDee on Sun 22/05/2005 13:17:55

Title: Arcade Sequences?
Post by: KrisMacDee on Sun 22/05/2005 13:17:55
Hey Bigmac here! I was wondering, how do you make arcade sequences like in Broken Sword. You know like you have a time limit to do an action like duck as someone's about to shoot the character . Any replies would be appriciated.Thanks Bigmac
Title: Re: Arcade Sequences?
Post by: Ishmael on Sun 22/05/2005 20:28:52
Simple. Script it.

Really, you just can't fire up AGS and make one. It'll take a lot of work to perfect it. For some arcade examples, see the demo game. There's a couple of arcade games. You really should go through the scripting tutorial and look through the functions for anything that might prove usefull with making your vision a working arcade sequence. We can't just give you the code. Use your own brain! ;)
Title: Re: Arcade Sequences?
Post by: PsychicHeart on Mon 23/05/2005 05:41:32
i THINK he means a countdown. i'm not sure how to do that, even though someone has sort of told me. I think we need a translator in the AGS Forums to 'Dumb down' some things.
Title: Re: Arcade Sequences?
Post by: Ishmael on Mon 23/05/2005 11:24:49
For time limits, the SetTimer and IsTimerExpired commands and the repeatedly_execute function will do the trick... but in my opinion no-one can just give the code for that, we can't read minds. Study the commands and try to work something out, and if it doesn't work though the code seems to be correct, post here so we can tell you what is wrong with the code.

I strongly support the trial and error -path, as it is what i took, and it's been great to discover my creations sudenly starting to work like a dream when I add an if condition and set a variable to be checked, or something...
Title: Re: Arcade Sequences?
Post by: KrisMacDee on Mon 23/05/2005 18:33:56
Flukeblake is right that's what I was talking about. Ishmael see when you add a Timer how would you stop the timer from going off every time you enter the room cos in my game you will go back to the room which the sequence is in.But thanx though the code has worked so far.Cheerz
Bigmac
Title: Re: Arcade Sequences?
Post by: Ashen on Mon 23/05/2005 19:11:13
Start it in First time player enters screen, or use a variable to check, e.g.:

if (GetGlobalInt(1) == 0) {
  SetTimer (1, 120);
  SetGlobalInt (1, 1);
}