Doom Comic
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Countdown
 
Author
All times are GMT. The time now is 11:19. Post New Thread    Post A Reply
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


Is there anyway using Doom2 or Zdoom features to make an on screen countdown? If so how? I know of one way but it would require me to type print (s:""); 300 times... is there an easier way? Oh yes I want this countdown to last 5 minutes before activating a script.

Old Post 08-18-03 13:10 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Ichor
The Mysterious Red Square


Posts: 6722
Registered: 07-02


Here's a simple way (I hope):
code:
script 1 (void) { int var0; var0 = 300; do { print(d:var0, s:" SECONDS REMAINING"); delay(35); var0--; } until(var0 == 0); if(var0 == 0) { Whatever; } }

__________________
0.666 - The number of the Millibeast

Old Post 08-18-03 13:45 #
Ichor is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02


revising Ichors:

code:
script 1 (void) { int var0 = 300; while(!var) { print(d:var0, s:" SECONDS REMAINING"); delay(35); var0--; } //do stuff here }


if you want it to print out mins as well (ie instead of 300 seconds, 5:00) that requires a couple extra lines of code and some padding but nothing too complex. you could also use hudmessage(); instead of print which allows a lot more freedom, in this case you can position the time anywhere on screen (print just centers it) or have it fade out upon completion.

Old Post 08-18-03 14:48 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


It works except for one problem. It won't activate the function that comes after the countdown. Here's what I have so far...
code:
#include "zcommon.acs" int countd; script 1 OPEN { print (s:"Objective 1\n\nFind the next elevator."); Delay (5*35); print (s:"Warning! Multiple bomb threats detected!"); Delay (3*35); print (s:"All personel evacuate immediatly!"); Delay (5*35); countd = 5; do { print(d:countd, s:" Seconds Until Explosion"); delay(35); countd--; } until(countd == 0); if(countd == 0) { Thing_Damage (1, 400); terminate; } }

What do I need to do?

Old Post 08-18-03 14:59 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


When I use your script Cyb the countdown doesn't even get displayed. Can you show me the lines of scripting necessary to display it in minutes in the upper right hand corner. If so thanks.

Old Post 08-18-03 15:06 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Nanami
not a woman


Posts: 2655
Registered: 07-02


Cyb's while loop says while (!var) and should read while (!var0) unless I'm reading it wrong.

__________________
ZooM, the ZDoom Racing Mod

Old Post 08-18-03 15:28 #
Nanami is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Ichor
The Mysterious Red Square


Posts: 6722
Registered: 07-02


Hmm... I was afraid that would happen. Let's try this:
code:
#include "zcommon.acs" int countd; script 1 OPEN { print (s:"Objective 1\n\nFind the next elevator."); Delay (5*35); print (s:"Warning! Multiple bomb threats detected!"); Delay (3*35); print (s:"All personel evacuate immediatly!"); Delay (5*35); countd = 5; do { print(d:countd, s:" Seconds Until Explosion"); delay(35); countd--; if(countd == 0) { Thing_Damage(1, 400); terminate; } } until(countd == 0); }

__________________
0.666 - The number of the Millibeast

Old Post 08-18-03 15:40 #
Ichor is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


I still don't have any function. Oh and I tried doing my function on a line. I have my player with a tag of 1, but when Thing_Destroy (1); activates the player is still alive. How can I destroy a player with Thing_Destory?

Old Post 08-18-03 16:10 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


Uh oh I just found a problem. The function does activate, but for some reason the player doesn't die! I added Sector_SetColor (0, 255, 0, 0); to test this and it does work. For some reason Thing_Destroy (1); doesn't work even though the player is tagged as 1. Any suggestions?

Old Post 08-18-03 16:21 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4449
Registered: 03-02


You can't tag player starts. And with this special you can't use tag 0, as that kills all untagged monsters instead. You could use DamageThing (400) assuming the script is not OPEN (as the player doesn't activate those) or telefrag a manikin with something on a scrolling floor (and unblock the teleport linedef when time is up).

Although I think there's a special that lets you tag a player, but I can't remember what it was. (it's like Player_ChangeTID or something)

Old Post 08-18-03 22:05 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Ichor
The Mysterious Red Square


Posts: 6722
Registered: 07-02


However, you can set a fast crusher that does a lot of damage right on top of a dummy player. Once that countdown reaches zero...splat!

__________________
0.666 - The number of the Millibeast

Old Post 08-18-03 22:26 #
Ichor is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


One more problem... how do I make dummy players? And I need dummy players for each of the 8 players is the problem because of the game being multiplayer as well.

Old Post 08-18-03 23:40 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Ichor
The Mysterious Red Square


Posts: 6722
Registered: 07-02


All you need is another player one start spot. For normal Doom, this is all you need, but for ZDoom and Hexen, it has to have the same tag number. I'm guessing that more than one player two, player three, etc. will work the same way, but I haven't tested that.







3000th post!


__________________
0.666 - The number of the Millibeast

Old Post 08-18-03 23:43 #
Ichor is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Kid Airbag
Not really a kid. Not really an airbag. WHAT THE HELL IS IT?!? Who's asking? Are you French? An airbag is a safety device in a car that inflates during a collision and blocks you from smashing your head into the dashboard or steering wheel!


Posts: 7619
Registered: 12-00


yayayayay for Ichor!

BTW when did HTML become enabled in posts?

__________________
Hey Jude

Old Post 08-18-03 23:57 #
Kid Airbag is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Ichor
The Mysterious Red Square


Posts: 6722
Registered: 07-02


It isn't actually.

__________________
0.666 - The number of the Millibeast

Old Post 08-18-03 23:59 #
Ichor is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4449
Registered: 03-02



cyber-menace said:
One more problem... how do I make dummy players? And I need dummy players for each of the 8 players is the problem because of the game being multiplayer as well.


More player 1 starts as suggested, but the one you create last will be the actual start (the highest thing number). You don't need to make them all the same tag number (not sure what he means there), but if you're using hubs, then you need a manikin for each of the start points (ie. one for player start 0, one for player start 1 etc.).

You only need to do this for entrance points that get used when you first enter the map.

And you'll need to repeat this for all the multiplayer starts, too.

Old Post 08-19-03 00:03 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Kid Airbag
Not really a kid. Not really an airbag. WHAT THE HELL IS IT?!? Who's asking? Are you French? An airbag is a safety device in a car that inflates during a collision and blocks you from smashing your head into the dashboard or steering wheel!


Posts: 7619
Registered: 12-00



Ichor said:
It isn't actually.
Oh so it's a special mods-only thing. I see how it is.

__________________
Hey Jude

Old Post 08-19-03 00:09 #
Kid Airbag is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


Ok my bomb is now working. Thank you very much.

Old Post 08-19-03 00:20 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Nanami
not a woman


Posts: 2655
Registered: 07-02



The Ultimate DooMer said:
You can't tag player starts.
You can give the player a tid, Randy posted an example. All you need is an open script that uses ChangeTid() or whatever the function is.

__________________
ZooM, the ZDoom Racing Mod

Old Post 08-19-03 04:04 #
Nanami is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Grazza
Super Moderator


Posts: 11450
Registered: 07-02



Archvile46 said:
BTW when did HTML become enabled in posts?
I think this answers your question.

Archvile46 said:
Oh so it's a special mods-only thing. I see how it is.
Supermods, admins and Ling, to be precise. It is also enabled in the moderators' forum. I had used it to post "peace be with you" in Inuktitut (when Julian went on holiday), so you can see it is a really valuable feature.

Old Post 08-19-03 09:40 #
Grazza is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02



Nanami said:
You can give the player a tid, Randy posted an example. All you need is an open script that uses ChangeTid() or whatever the function is.


code:
script 1 enter thing_changetid(0, tag);


assigns tag to the player

Old Post 08-19-03 23:15 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 11:19. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Countdown

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory