Monster Drops / Powerup Pickups

Hey all,
Still pretty new to this nesmaker stuff. Been trying to work in 4.1 on the adventure module and I'm unsure of how to make monster drops work. I've been able to get their death animation to work correctly, but can't seem to make them drop health, currency, or keys. I've noticed that the scripts for the powerups are blank, and am unsure if the monster drops script need to be edited. Is there any guide for setting this stuff up anywhere? I'm not very good at the assembler stuff, so I was wondering if there was any premade powerup or monster drop scripts that can be used, or if the unedited monster drops script should work.

I appreciate any advice you can offer.
 

dale_coop

Moderator
Staff member
Yep, just a rapid check in the Code section... (or a using the search function)... and here a fix to help you ;)
http://nesmakers.com/viewtopic.php?p=10689#p10689
 
Thank you again!
I had already tried using this HandleDrops script, but it doesn't seem to be working in my case, so I changed it back. I updated it to be this script again, and still no luck. Monsters are running their death animation correctly, but still aren't causing any powerups to drop, and I've set all the pickups in the game objects already. I also made sure that they are selected as powerup/pickups and have a bounding box. Are the health, currency and key locations hardcoded in the module or the script, or is there maybe another script I need to change?
 

dale_coop

Moderator
Staff member
And in the "Project Settings > Script Settings", have you assigned the "Routines\Basic\ModuleScripts\HurtWinLoseDeath\HandleDrops.asm" script to the "Handle Drops"?
(and check that the content of your "HandleDrops.asm" script doesn't start with the "RTS" opcode ;))
 
Yes, Handle Drops is set to "Routines\Basic\ModuleScripts\HurtWinLoseDeath\HandleDrops.asm" and I made sure that the script doesn't start with RTS. Do I have to define any of the Power Up 00 - Power Up 03 scripts for the items to drop?
 

dale_coop

Moderator
Staff member
You don't need to assign any Power Up 00 - 03 to make the mosnter drops the power up (...those scripts PowerUp 00-03 will be the ones executed when you actually collect each of them)
How do you kill the monsters? with your sword? with your projectiles?

Do the test killing them with projectiles. (the adventure tutorial sword kills the monster without dropping anything).
 

dale_coop

Moderator
Staff member
Else you could use my alternate HandleSpriteWeapon script (the same sprite-based sword but it takes in consideration the monster's health, does the monster death and the monster drops):
http://nesmakers.com/viewtopic.php?f=3&t=1738
 
Thank you so much! The handle sprite weapon and handle drop scripts work great! My character is able to gain currency and hearts from the pickup drops now, using both the sword and the projectile as a weapon now.

One final question about this. I've been trying to use the LifeKeysCash HUD like in the 4.0 video, and the hearts and currency seem to display fine, and update with the drops appropriately. However, after I kill a few monsters, suddenly the Keys counter goes up. It seems about after every 10 or so monsters I kill, the key count increases, and sometimes it takes more monsters to increase it and sometimes less. I don't have the key drops set up, and it was even doing this before I defined the powerup scripts in my project, so I don't think its an issue with those. Any ideas what could be causing that issue?
 

dale_coop

Moderator
Staff member
Strange for the keys... you re not the only one having this issue. I will investigate and try to find a fix.
 

dale_coop

Moderator
Staff member
theDarkLordSagan said:
One final question about this. I've been trying to use the LifeKeysCash HUD like in the 4.0 video, and the hearts and currency seem to display fine, and update with the drops appropriately. However, after I kill a few monsters, suddenly the Keys counter goes up. It seems about after every 10 or so monsters I kill, the key count increases, and sometimes it takes more monsters to increase it and sometimes less. I don't have the key drops set up, and it was even doing this before I defined the powerup scripts in my project, so I don't think its an issue with those. Any ideas what could be causing that issue?

For the keys... it looks like when you kill a monster, it increases the Score variable. When the score variable becomes more than 8 (looks like a bug), the memory just after is increased (it's the memory used by the keys variable).

So until a real fix is found, I would suggest to disable the increase Score on killing a monster. Modify your "HandleHurtMonster.asm" script, commenting out the lines:
Code:
	;AddValue #$08, myScore, #$01, #$00

	;STA hudElementTilesToLoad
	;	LDA #$00
	;	STA hudElementTilesMax
		; LDA DrawHudBytes
		; ora #HUD_myScore
		; STA DrawHudBytes
	;UpdateHud HUD_myScore

Your keys should work correctly now ;)
 
Top Bottom