How do I get my NPC to function properly?

Anthrax101

New member
C:\Users\Maximillian\Downloads\nesmaker_4_1_5\NESmaker_4_1_5\GameEngineData>asm6 MainASM.nes game.nes demo.txt
pass 1..
Routines\Basic_NoScroll\ModuleScripts\InputScripts\b_activate_text_box.asm(29): Label already defined.
Routines\Basic_NoScroll\ModuleScripts\InputScripts\b_activate_text_box.asm(42): Label already defined.
Routines\Basic_NoScroll\ModuleScripts\InputScripts\b_activate_text_box.asm(47): Label already defined.
demo.txt written.

C:\Users\Maximillian\Downloads\nesmaker_4_1_5\NESmaker_4_1_5\GameEngineData>pause
Press any key to continue . . .

Is what shows up.
 
The game.nes error in the screenshot you shared just means that the .nes file was not created. It wasn't created because of whatever error that was displayed in the black console box. Once we fix the error noted by the console box, the game.nes error will be fixed as well.
 

dale_coop

Moderator
Staff member
Exactly, when you compile your project scripts (export & test), it will combine all those and create a game.nes (it’s the final game rom file). And if this file is generated, NESMaker will start the emulator with this game.nes file.
But if there is an error in your script, the compilation fails, the game.nes file can’t be generated, NESMaker doesn’t start the emulator and displays this error message instead.
 

dale_coop

Moderator
Staff member
You have errors in your scripts. So it doesn't compile.
Fix your errors (as we suggested) and it will compile without any error, and the game will start correctly in the emulator ;)
 

dale_coop

Moderator
Staff member
Those scripts are "just" the input scripts added/linked to your project... that you can assign in the "Input Editor" to buttons/inputs press/hold/release.
A lot more scripts (used for the game engine, collision detections,... not directly related to button inputs) are listed/assigned in the "Project Settings > Scripts Settings".

Now, just with the input scripts you added... I see an error. The HandlePlayer_NPC_Collision should no't be here... You need to remove it (right click -> remove)
Also, you don't need the "b_activate_textbox" script... because the b_create_melee already does it (has the same code). You need to remove it (right click -> remove).
In the "Input Editor" too, remove the associations you could have made with those scripts (if you did). If you are not sure, share screenshot, we can tell you.
 

Anthrax101

New member
Awesome! That worked! But the interaction with my NPC just creates a black rectangle to its left that crashes the game. I don't know why it's still doing that.
 

dale_coop

Moderator
Staff member
Follow the tutorial videos (www.thenew8bitheroes.com) the adventure 20min one... it will help you to set your texts NPCs.
 
Top Bottom