My game wont compile anymore!

Post Reply
McCully96
Posts: 4
Joined: Fri May 17, 2019 12:13 pm

My game wont compile anymore!

Post by McCully96 » Fri May 17, 2019 12:18 pm

I've been having trouble with NESMaker, it works but when you restart your computer it just messes up the program. Yesterday, my adventure game was working 100% fine, now I can't compile it and it keeps giving me script errors which I didn't change so I don't know what's happened. When I compile the game I get this:
pass 1..
pass 2..
last try..
Routines\Basic\ModuleScripts\PowerUpCode\Powerup_IncreaseHealth.asm(33):PlaySound(3): Unknown label.
demo.txt written.

Anyone know how to fix this?
My HUD colour also changed from black to green and I don't know how to change it back
User avatar
dale_coop
Posts: 3954
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: My game wont compile anymore!

Post by dale_coop » Fri May 17, 2019 12:32 pm

If you open the Powerup_IncreaseHealth.asm script at the line 33 (as the error), you'd see:

Code: Select all

skipGettingHealth:
	PlaySound #SFX_INCREASE_HEALTH
Now, in NESmaker, check your Sounds > SFX... if you don't have the sfx named "SFX_INCREASE_HEALTH" add a new one and name it "SFX_INCREASE_HEALTH" (and associate a sound to that SFX Label).

Image

Save your project and retry ;)
-----
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)
McCully96
Posts: 4
Joined: Fri May 17, 2019 12:13 pm

Re: My game wont compile anymore!

Post by McCully96 » Fri May 17, 2019 12:58 pm

That worked perfectly thank you very much! Although I do have one more question, how do I actually pick up the health pickup? When I place it in the game I just end up walking over it, do I have to assign the game object to the health pickup script?
User avatar
dale_coop
Posts: 3954
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: My game wont compile anymore!

Post by dale_coop » Fri May 17, 2019 1:03 pm

Check your Pickup object... open its "Object Details". Then, in the "details" tab, set it as "pickup / powerup".
Also set the "Edge Object Reaction" to "Screen Extend". And don't forget to set a Bounding Box.
-----
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)
McCully96
Posts: 4
Joined: Fri May 17, 2019 12:13 pm

Re: My game wont compile anymore!

Post by McCully96 » Fri May 17, 2019 3:22 pm

Thanks, I can pick up the item now but it doesn't add another heart to my overall health, do I need to add that to the script?
User avatar
dale_coop
Posts: 3954
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: My game wont compile anymore!

Post by dale_coop » Fri May 17, 2019 3:37 pm

How have you assigned the Powerup_IncreaseHealth.asm script to your project? (in "Project Settings > Script Settings"?)
Which object are you using as health pickup? The 1st pickup object in the hierarchy list (under "Game Objects")?

Also :
What is the value of your Player 's Health (in the "Object Details > Details" tab)?
What is the value of your myHealth HUD variable (in the "HUD & boxes > Hud variables" tab)?
How do you display the myHealth element (in the "HUD & boxes > Hud elements" tab)? as a number? as hearts?

Don't hesitate to share screenshots... ;)
-----
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)
McCully96
Posts: 4
Joined: Fri May 17, 2019 12:13 pm

Re: My game wont compile anymore!

Post by McCully96 » Fri May 17, 2019 3:53 pm

Okay so I looked through other threads and found a slightly modified script so it works perfectly and updates the HUD, I just now need to figure out how to make the pickup disappear completely once picked up. If I move to the next screen and back again it reappears which, y'know, could be exploited!
User avatar
dale_coop
Posts: 3954
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: My game wont compile anymore!

Post by dale_coop » Fri May 17, 2019 4:01 pm

If you don't want it to be again on the screen, if you re-enter the screen, you need to trigger the screen.
Triggered screen don't load the same objects (monsters). When a screen is triggered, all the screens that have the same screen-type value are triggered too (you can set the screen-type of your screen in the "Screen Info" dialog).

If you want to trigger the current screen when you pickup the object, modify the Powerup_IncreaseHealth script, adding at the end:

Code: Select all

	TriggerScreen screenType
-----
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