Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

[ZScript] Killing a Trigger with this_npc->HP = 0

2 replies · 911 views · Started 30 May 2007

If you kill a trigger enemy in the following method, it plays the "enemy death" sound. This is a good idea normally, but not if you are killing a trigger. Besides, you could always just use PlaySound.


npc trigger = Screen->LoadNPC(1);
if(trigger->HP != 0)
{
trigger->HP = 0;
}

I would suggest putting if(enemy_that_died != trigger) around the "play enemy death sound" code.

An example quest with this would be my iceblock quest, found in the script showcase forum.

Yep, yep, yep, the sound is unwanted. Though not technically a "bug" per se, it really should be changed so that when a Trigger is killed like that, a sound won't play.

User posted image