Author Topic: Timed playing of views  (Read 2611 times)

0 Members and 1 Guest are viewing this topic.

Offline Zonkie

Timed playing of views
« on: December 11, 2002, 10:07:29 AM »
I'm not into AGI countdown variables yet, but I have a question about them, which I hope you can help me with: I have an animation that is supposed to be repeated, but not on a regular basis. I want it to be played every 30 seconds or so. How would I be able to program a countdown that would make the view play every set number of seconds? And also, I noticed that I can't end.of.loop a view a few times after each other, for example to play an animation three times only, using an incrementing variable in between. What would I have to do here?

Thank you for your help,

Zonkie



Offline Jelle

Re:Timed playing of views
« Reply #1 on: December 11, 2002, 10:21:19 AM »
Quote
And also, I noticed that I can't end.of.loop a view a few times after each other, for example to play an animation three times only, using an incrementing variable in between. What would I have to do here

Well, I don't know if this is the best solution, but I know that in PQ2, they do it like this:

Code: [Select]
if (said("do","animation") && !f100) {
  set(f100);
  animate(o1);
  //blabla

  start.cycling(o1);
  v100=0;
}
v100++;

if (v100==50) {
  reset(f100);
  stop.cycling(o1);
}

You don't know how long (in seconds) it will cycle, but you can say how many times you do a certain loop... If a loop has 5 cels, and you wait until v100 = 50 then the loop will be cycled 10 times (each cel will be displayed 10 times)

If you want the loop being drawn on a random moment, do this:

Code: [Select]
if (!f100) {
  random(0,20,v101);
  if (v101==0) {
    set(f100);
    animate(o1);
    //blabla

    start.cycling(o1);
    v100=0;
  }
}

v100++;

if (v100==50) {
  reset(f100);
  stop.cycling(o1);
}
« Last Edit: December 11, 2002, 10:26:13 AM by Jelle »
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Joey

  • Guest
Re:Timed playing of views
« Reply #2 on: December 11, 2002, 03:08:54 PM »
pq2 was sci jelle.

Offline Nick Sonneveld

Re:Timed playing of views
« Reply #3 on: December 14, 2002, 04:25:32 AM »
I think it's obvious he's referring to Police Quest instead.  I've noticed PQ1 does use the timers that he speaks of.

There's one right at the start of the game where you have to be in the briefing room before a certain time.  If you read the paper, it actually jumps ahead in time for you so people start entering soon after you finish reading.

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Jelle

Re:Timed playing of views
« Reply #4 on: December 14, 2002, 02:44:33 PM »
Check room 17 in Space Quest II, when the ego is trapped he goes up and down a few times, but it's just one cycle over and over...
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.022 seconds with 17 queries.