Monster giving player key glitch

(Crossposted from ask for help)

Hey, I'm having a weird problem...

Sometimes, seemingly randomly, when you kill an enemy it will give the player key. More specifically, the key won't drop from the monster or anything, but once you scroll to another screen, it will say you have a key. My game is using the "Adventure" module, and is set up in a way where the player having a key pretty much destroys the game. I have no idea why this is happening and I can't seem to find a way to fix it. I'm assuming it's a glitch.

https://youtu.be/KMRCyw_kN7M
 

dale_coop

Moderator
Staff member
Take a look at this post: http://nesmakers.com/viewtopic.php?p=14988#p14988

(Display the score or comment out the code increasing the score when killing monsters and you will fix your issue)
 
dale_coop said:
Take a look at this post: http://nesmakers.com/viewtopic.php?p=14988#p14988

(Display the score or comment out the code increasing the score when killing monsters and you will fix your issue)

Thanks so much, that seemed to fix the issue!
However, it introduced a new problem-- now the score is acting weird, and increasing randomly to a number higher than that of monsters I've killed.
Is there any way to just prevent the score from increasing when an enemy is killed?
 

dale_coop

Moderator
Staff member
You could edit the Handle Monster Hurt (in your "Project Settings > Script Settings")... and comment out (adding a ";" in front of the code) the lines:
Code:
	; AddValue #$08, myScore, #$01, #$00
(this code was adding 1 point)

And :
Code:
	; UpdateHud HUD_myScore
(this code was updating the HUD score element)
 
dale_coop said:
You could edit the Handle Monster Hurt (in your "Project Settings > Script Settings")... and comment out (adding a ";" in front of the code) the lines:
Code:
	; AddValue #$08, myScore, #$01, #$00
(this code was adding 1 point)

And :
Code:
	; UpdateHud HUD_myScore
(this code was updating the HUD score element)

Thanks a million! :D 
 
Top Bottom