Pickups are Acting Strange... Please Help!

User avatar
EnderElectrics
Posts: 9
Joined: Wed Sep 11, 2019 3:58 pm
Location: the Netherlands
Contact:

Pickups are Acting Strange... Please Help!

Post by EnderElectrics » Wed Sep 11, 2019 4:18 pm

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!
- Ya Boi, Ender.

some Info about me:
I Have a Cringy Youtube channel called EnderElectrics.
I'm on this forum because:
1. I love NESmaker! It's a great tool!
2. I like to Animate and Code, wich means I run into problems alot with my hobbies! :,)
User avatar
EnderElectrics
Posts: 9
Joined: Wed Sep 11, 2019 3:58 pm
Location: the Netherlands
Contact:

Re: Pickups are Acting Strange... Please Help!

Post by EnderElectrics » Wed Sep 11, 2019 4:20 pm

If anyone wants a download link to mess around with, just tell me. I'll give it no problem.
- Ya Boi, Ender.

some Info about me:
I Have a Cringy Youtube channel called EnderElectrics.
I'm on this forum because:
1. I love NESmaker! It's a great tool!
2. I like to Animate and Code, wich means I run into problems alot with my hobbies! :,)
User avatar
dale_coop
Posts: 4100
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Pickups are Acting Strange... Please Help!

Post by dale_coop » Wed Sep 11, 2019 7:09 pm

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.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
EnderElectrics
Posts: 9
Joined: Wed Sep 11, 2019 3:58 pm
Location: the Netherlands
Contact:

Re: Pickups are Acting Strange... Please Help!

Post by EnderElectrics » Thu Sep 12, 2019 6:12 pm

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)
- Ya Boi, Ender.

some Info about me:
I Have a Cringy Youtube channel called EnderElectrics.
I'm on this forum because:
1. I love NESmaker! It's a great tool!
2. I like to Animate and Code, wich means I run into problems alot with my hobbies! :,)
User avatar
dale_coop
Posts: 4100
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Pickups are Acting Strange... Please Help!

Post by dale_coop » Thu Sep 12, 2019 6:57 pm

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: Select all

			LDA #HUD_LOAD	
			AND #%01000000
			BEQ +
			STA hudElementTilesToLoad
And modify like this (adding a line of code):

Code: Select all

			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: Select all

DoScreenOffHudUpdate:
	LDX player1_object
	LDA Object_health,x
	STA myHealth
And modify like this :

Code: Select all

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.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
EnderElectrics
Posts: 9
Joined: Wed Sep 11, 2019 3:58 pm
Location: the Netherlands
Contact:

Re: Pickups are Acting Strange... Please Help!

Post by EnderElectrics » Fri Sep 13, 2019 5:23 am

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.
- Ya Boi, Ender.

some Info about me:
I Have a Cringy Youtube channel called EnderElectrics.
I'm on this forum because:
1. I love NESmaker! It's a great tool!
2. I like to Animate and Code, wich means I run into problems alot with my hobbies! :,)
User avatar
dale_coop
Posts: 4100
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Pickups are Acting Strange... Please Help!

Post by dale_coop » Fri Sep 13, 2019 1:26 pm

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).
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
EnderElectrics
Posts: 9
Joined: Wed Sep 11, 2019 3:58 pm
Location: the Netherlands
Contact:

Re: Pickups are Acting Strange... Please Help!

Post by EnderElectrics » Sun Sep 15, 2019 3:23 pm

I did everything you said, but now my Health doesn't go up at all.
- Ya Boi, Ender.

some Info about me:
I Have a Cringy Youtube channel called EnderElectrics.
I'm on this forum because:
1. I love NESmaker! It's a great tool!
2. I like to Animate and Code, wich means I run into problems alot with my hobbies! :,)
User avatar
EnderElectrics
Posts: 9
Joined: Wed Sep 11, 2019 3:58 pm
Location: the Netherlands
Contact:

Re: Pickups are Acting Strange... Please Help!

Post by EnderElectrics » Sun Sep 15, 2019 3:24 pm

*once I collect a Health pickup.
- Ya Boi, Ender.

some Info about me:
I Have a Cringy Youtube channel called EnderElectrics.
I'm on this forum because:
1. I love NESmaker! It's a great tool!
2. I like to Animate and Code, wich means I run into problems alot with my hobbies! :,)
User avatar
dale_coop
Posts: 4100
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Pickups are Acting Strange... Please Help!

Post by dale_coop » Sun Sep 15, 2019 7:21 pm

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?
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
Post Reply