How do I get my NPC to function properly?

Anthrax101

New member
Hey, I'm Anthrax101. I'm new to NESmaker. I'm here because my NPC is not working properly. This is what it's doing:
It isn't solid
It can't be interacted with
It doesn't even open the text box
It doesn't seem to be functioning with enemies around
can I have a tutorial on how to make a proper NPC? Thanks!
 
Hello Anthrax101

Here is s link to the site with all the tutorials, you walk want to do the monster tutorial. Monsterd and NPC'S function the same way.

Cheers

http://www.thenew8bitheroes.com
 

dale_coop

Moderator
Staff member
1) set your object as a "NPC" and assign it to a monster group
2) set your texts... and assign your texts to a text group
3) set your screen, assign monster group and text group.
place your NPC (if you place him as "monster 1" he will use the 1st text of your text group (if you place him as "Monster 2", he will say the text 2, ...)
4) If it's an adventure game and have assigned the "b_create_melee.asm" script (from the input\adventure subfolder), the text will be displayed when pressing the B button.
If you don't make an adventure game or didn't use this script (if used another weapon one), you will need a "b_activate_text_box.asm" script (from here: http://nesmakers.com/viewtopic.php?p=11612#p11612 or copy/paste the one from your Basic_NoScroll\ModuleScripts\InputScripts\ folder). And assign that script to the "Press" B Button.

Note: the NPC has no collision. You just go on him and press B.
 

Anthrax101

New member
I put in the create melee script. Now whenever I press the b button away from an NPC it crashes the game. Now whenever I press the b button at from an NPC it crashes the game exept it creates a black rectangle to the NPC's left.
 

Anthrax101

New member
That's the tutorial I tried. Somehow it doesn't seem to work. Since we're gonna get more complex tutorials sooner, I may be enlightened but the tutorial I watched didn't really help.
 

dale_coop

Moderator
Staff member
If you follow the tutorial, you don't need to do any modification in scripts.
The scripts are already correct.
The "b_create_melee.asm" script (from the input\adventure subfolder) already contain the code for activating text box when colliding a NPC.
I would suggest to start again... You might have missed something.
 

dale_coop

Moderator
Staff member
I'd suggest you to not using the noScroll core... it's quite buggy. You should use the Basic one (simple platformer module or adventure module, ...)
And follow the tutorial, then you can compare your tutorial game and the new game you are creating... to check the difference in settings/scripts/....

Btw, the error details are in the command line window (the black window that appears when you export & test), copy/paste or screenshot it for sharing.
 

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\ModuleScripts\InputScripts\ActivateTextbox.asm(39): Label already defined.
Routines\Basic\ModuleScripts\InputScripts\ActivateTextbox.asm(61): 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 . . .
 

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\ModuleScripts\InputScripts\ActivateTextbox.asm(39): Label already defined.
Routines\Basic\ModuleScripts\InputScripts\ActivateTextbox.asm(61): 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 . . .

this is what it says...
 

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\ModuleScripts\InputScripts\ActivateTextbox.asm(39): Label already defined.
Routines\Basic\ModuleScripts\InputScripts\ActivateTextbox.asm(61): 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 . . .
 

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\ModuleScripts\InputScripts\ActivateTextbox.asm(39): Label already defined.
Routines\Basic\ModuleScripts\InputScripts\ActivateTextbox.asm(61): 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 . . .
 

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\ModuleScripts\InputScripts\ActivateTextbox.asm(39): Label already defined.
Routines\Basic\ModuleScripts\InputScripts\ActivateTextbox.asm(61): 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 . . .
 

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\ModuleScripts\InputScripts\ActivateTextbox.asm(39): Label already defined.
Routines\Basic\ModuleScripts\InputScripts\ActivateTextbox.asm(61): 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 . . .
 

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\ModuleScripts\InputScripts\ActivateTextbox.asm(39): Label already defined.
Routines\Basic\ModuleScripts\InputScripts\ActivateTextbox.asm(61): 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 . . .
 

dale_coop

Moderator
Staff member
Don't use the ActivateTextbox.asm script (it doesn't work correctly)... If you are using the basic core, and Basic scripts, you may already have the "b_create_melee.asm" script assign, which contains the textbook activation code.
(same button for melee attack and activate npc texts)

If you want to separate those actions... you could make a script for activate text like this one: http://nesmakers.com/viewtopic.php?p=11612#p11612
 

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 . . .
 
Top Bottom