Eponasoft
Member

Posts: 478
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. :)
|