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 > ACS print() problem?
 
Author
All times are GMT. The time now is 18:03. Post New Thread    Post A Reply
Eponasoft
Member


Posts: 476
Registered: 07-09


This might get a bit drawn out, so please bear with me. :)

For the record, I am using GZDOOM r1281. This version is probably out of date, but I've been away for awhile so I am not sure. Anyway... I have a scripted event at the end of a project in which text is drawn to the screen using normal print() statements. This event is triggered by the destruction of the final boss, who is spawned at a mapspot and assigned a special.

The code to create the monster:

code:
SpawnSpot("bossthingie",1,203); SpawnSpot ("TeleportFog", 1); Thing_SetSpecial(203,80,11,4,0); ACS_Execute(252,4,0,0,0);


That all works just fine. Now, there's a timer on this battle... if you don't kill the boss within 180 seconds, another event takes place which will do it for you in elegant fashion... by raining bombs.

code:
while (bosslives == 1) { SpawnProjectile(2,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(3,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(4,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(5,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(6,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(7,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(8,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(9,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(10,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(11,"SuperDeathBomb",0,0,-10,1,0); SpawnProjectile(12,"SuperDeathBomb",0,0,-10,1,0); delay(10); }


This, too, works fine. Stuff starts to break at script 11...

code:
bosslives = 0; rescue = 0; SetMusic("NOMUSIC",0); delay(210); print(s:"Text to display."); delay(70); Exit_Normal(0);


...which is the script set to execute as the monster's special, using Thing_SetSpecial earlier. Now here's the odd part... this script executes regardless of how the boss dies, but "Text to display." will not appear if a "SuperDeathBomb" takes out the boss... if you take it out yourself before the bombs fall, it displays fine. And I know the script is executing, since the level ends after the delays finish.

Any ideas?

__________________
My Heretic TC: Two Lords. It's here on the forum somewhere. :)

Old Post 09-27-12 06:51 #
Eponasoft is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11553
Registered: 07-07



Eponasoft said:
Now here's the odd part... this script executes regardless of how the boss dies, but "Text to display." will not appear if a "SuperDeathBomb" takes out the boss... if you take it out yourself before the bombs fall, it displays fine.

This is perfectly normal and expected.

When a monster dies, its killer is considered the activator of the monster's special. (Though there are some MAPINFO settings where you can set it so that the monster itself is the activator. There are further changes that can be made, too.)

But keep in mind this notion of activator for scripts. When the boss monster is killed by a bomb, the activator is the bomb. When the boss monster is killed by the player, the activator is the player.

Now, let's take a second look at print.

Print will only display for the activator of the script, so if an enemy (or another player) activates a script with a Print statement in it, then you will not see it. For printing to all players, see PrintBold.


You're printing that message on the bomb's HUD. (Which of course doesn't actually have a HUD, so nothing happens.)

Old Post 09-27-12 09:31 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Eponasoft
Member


Posts: 476
Registered: 07-09


Oh, ok... excellent. Thank you very much for the info.

__________________
My Heretic TC: Two Lords. It's here on the forum somewhere. :)

Old Post 09-27-12 15:59 #
Eponasoft is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 18:03. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > ACS print() problem?

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.