Eponasoft Posted September 27, 2012 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: 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. 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... 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? 0 Share this post Link to post
Gez Posted September 27, 2012 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.) 0 Share this post Link to post
Eponasoft Posted September 27, 2012 Oh, ok... excellent. Thank you very much for the info. 0 Share this post Link to post