RPG Starter

by Falacy
An Open Source Demo/Game with everything you'll need to get started on your very own BYOND Game!
ID:292215
 
Fix one and I find another.

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()
Where/how do you have BossMonsterDead defined?
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.
In response to Falacy
Oh sorry, I fixed this.

I didn't define it as usr.BossMonsterDead as I should have considering that's how I declared the var. Thanks anyway.

This language is difficult due to the organization. Data types should be defined lol