Pickups are Acting Strange... Please Help!

EnderElectrics

New member
Hey there. I'm having issues with my NESmaker game.

When I place a Currency Pickup (Right Click > Place Monster 1-4 > Currency Pickup) and I collect it, it adds to my Keys.
I have a section in the HUD with Numbers (and yes, under the "myMoney" Variable). But it just dissapears once I start the game (the numbers). Not only that, but once I collect a key (Not the tile, but the Key Pickup), it doesn't add to anything. I hear a sound effect and the key dissapears. One other thing I noticed is that, when I collect a Heart Pickup, my health gets set BACK to one heart. Leaving the other 4 health icons empty.


I don't understand any of this, and maybe I have forgot to set thier scripts correctly or something(?), but I digress. I need help on this. In fact, I might even give you a DOWNLOAD of the project, so you can see, and edit stuff for yourself. I find that is (mostly) the best solution, since nobody has to write down a whole list of instructions, and I can't follow the instructions wrong. But then again, there isn't much room for people having the same problem, since it only helps ME, and MY project. Anyway... please help. I know this has been a giant chunk of text, excuse me for that, but I still need all the help I can get.

Thanks for your help!
 

dale_coop

Moderator
Staff member
Hmmm... the increase Money script is meant to update a 8 digit hud element. Have you set your myMoney HUD element to be displayed as number 8 digits (00000000) ?

Then try again... for the keys and for the health. To check which issue remains.
 

EnderElectrics

New member
I set the max Value to 8... Didn't seem to do anything. It still adds to the Keys. I made it so that the numbers go from 0 to 7. (from the preview in the HUD editor)
 

dale_coop

Moderator
Staff member
Good.
Now, you need to fix some current issues in NESmaker about the health HUD itself...
When the game starts it always shows hud MAX (eveen if the health is lower)...

To fix that issue:
1) modify the "HandleUpdateObjects.asm" script (in the "Basic\System\" folder), around line 193, locate those lines:
Code:
			LDA #HUD_LOAD	
			AND #%01000000
			BEQ +
			STA hudElementTilesToLoad
And modify like this (adding a line of code):
Code:
			LDA #HUD_LOAD	
			AND #%01000000
			BEQ +
			LDA myHealth	;;HERE <-------- fix to start with the correct hud health
			STA hudElementTilesToLoad

1) modify the script assgined to the "Hud Element 0" element in your "Project Settings > Script Settings" (it should be the HUD_Element_Var_Image.asm script), , around line 12, locate those lines:
Code:
DoScreenOffHudUpdate:
	LDX player1_object
	LDA Object_health,x
	STA myHealth
And modify like this :
Code:
DoScreenOffHudUpdate:
	; LDX player1_object 	;; commented out !
	; LDA Object_health,x	;; commented out !
  	; STA myHealth	;; commented out !
	LDA myHealth	;;dale_coop: fix to start with the correct hud health
Now it should display the right health value in the HUD.
 

EnderElectrics

New member
Seems like it makes sense... My health might've actually been displayed as full, even though it was empty... so when I grabbed the health pickup, my health went back to 1.
Thanks! I'll give this a shot.
 

dale_coop

Moderator
Staff member
Also, don't forget to set your Player object's health (in "object details") to the value (for example "3") and the same value for the "myHealth" initial value (in hud & boxes > hud use variables).
 

dale_coop

Moderator
Staff member
Have you assigned correctly the increase health script to the corresponding PowerUp element in Project Settings > Script Settings ?
Could you share a screenshots of your game objects (in the tree view on the left of NESmaker) and a screenshot of your PowerUp element in Project Settings > Script Settings?
 
Jumping in on this conversation because I am also having an issue with myMoney not updating when I pick up currency drop from monsters. It's the only element not working for me and I can'f figure out why.
 

dale_coop

Moderator
Staff member
Is the "Powerup_IncreaseMoney.asm" script assigned to the "Power Up 03" in your "Project Settings > Script Settings"?
 

EnderElectrics

New member
dale_coop said:
Have you assigned correctly the increase health script to the corresponding PowerUp element in Project Settings > Script Settings ?
Could you share a screenshots of your game objects (in the tree view on the left of NESmaker) and a screenshot of your PowerUp element in Project Settings > Script Settings?

Sure. (I don't know how to add pictures into the post, so I will give you a download link instead)
I might've assigned them wrong...
 

Attachments

  • ScreenshotGameObjects.PNG
    ScreenshotGameObjects.PNG
    7.6 KB · Views: 832
  • ScreenshotPowerUpElements.PNG
    ScreenshotPowerUpElements.PNG
    9.1 KB · Views: 832

EnderElectrics

New member
Oh... My... Goodness...

I'm so stupid.

As you can see from the screenshot above, PowerUp 01 is set to IncreaseMoney.
I placed a Charge Pickup, picked it up, and my Money went up.

And I knew this too! The Tutotial man said that I could change the name of the Game Objects to anything I would want to...

I'm such a stupid little kid.
 

EnderElectrics

New member
Alright. Health is still doing some wierd stuff though.
Like, most of the time my health doesn't go up...

Also... Picking up Currency doesn't trigger the screen? I've always thought that.

Anyways, Assign the Scripts to the correct position, got it.
 

dale_coop

Moderator
Staff member
Oh?! I seen on your screenshots that you are using the Basic_NoScroll module. It's not a very stable module. A lof of bugs to fix. if you are beginner maybe you should start with the Basic_adventure or Basic_SimplePlatforme...?
Anyway, if want to continue with the NoScroll, you'll have to start by following this topic to fix some of its main issues: http://nesmakers.com/viewtopic.php?f=35&t=2076
 
Top Bottom