Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Countdown Cog help
Countdown Cog help
2001-11-09, 2:54 AM #1
Just wondering if its possible to create a cog which has a trigger (say entering a sector) which starts a timer, and after the time expires shows a cutscene (eg. in ToaM 2 the train countdown). If it is possible then how is it done?

This is assuming that code for the cutscene is already prepared...
2001-11-09, 5:21 AM #2
Er, I'll be back in an hour. Need to d/l and play ToaM2 (I've been stuck on a horribly outdated laptop for a while - finally got a new monitor for my regular comp).

Should it count down visibly, printing out "10", "9", "8", etc. to the screen? Or just silently?

-Jipe
2001-11-09, 5:23 AM #3
Mmmm. Cutscenes... Mmmmmmmm.


Use something like this:

 

Entered:

If(Getsenderref() == Trigger_sector) {
Settimer(Sleep_time); } Stop;

Timer:

//Run cutscene code here...

 

That should do the trick. [http://forums.massassi.net/html/biggrin.gif]


------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-11-09, 5:40 AM #4
Yeah. If you wanted it to print out every second, or whatever:

Code:
symbols

sector thesector
int countdown
message entered
message timer

end

code

entered:
if(GetSenderRef() == thesector)
{
 SetTimer(1);
}
return;

timer:
if(countdown >= 0)
{
 PrintInt(countdown);
 countdown = countdown - 1;
 SetTimer(1);
}
else
{
insert cutscene code
}
return;

end


where countdown is an int and thesector is.. the sector [http://forums.massassi.net/html/wink.gif]

-Jipe
2001-11-09, 6:06 AM #5
Or like this.... [http://forums.massassi.net/html/biggrin.gif]

 


Some_message:

For(I=Startint;I>=0;I=I-1){
Sleep(1.0);
JKstringclear();
JKstringconcatint(I);
JKstringoutput(); }

Call some_other_message;


 

That should do it...

------------------
Success is the inverse relationship between effort, gain, and loss.

[This message has been edited by GBK (edited November 09, 2001).]
And when the moment is right, I'm gonna fly a kite.
2001-11-10, 3:44 AM #6
Ta, I'll give it a wizz..If theres any probs then ill be back :P

↑ Up to the top!