I need the program to recognize the death of a certain monster. I tried to due it by setting by doing this when Deathcheck() is called. It keeps giving me the 'else' result "Defeat the Dragon you fool!" when I have clearly defeated it.
if(src.MaxHP == 100) // the boss's MaxHP is 100.
BossMonsterDead = 1
// and then in a npc verb
if(BossMonsterDead == 1)
usr << "<big><B><I> Congratulations! You Win!"
spawn(5)
shutdown()
There are probably better ways to check if its a boss, like checking its type, unless 100 MaxHP is for all bosses, and never for other enemies.
Using if(Value==1) is unnecessary for Boolean (true/false) values. You can just do if(Value) and if(!Value). The ! meaning not. Its more useful in various situations, and more consistent in general.