How do I get my NPC to function properly?

Anthrax101
Posts: 12
Joined: Sat Apr 06, 2019 2:37 pm

Re: How do I get my NPC to function properly?

Post by Anthrax101 » Thu Apr 11, 2019 11:49 pm

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 . . .
User avatar
dale_coop
Posts: 3486
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: How do I get my NPC to function properly?

Post by dale_coop » Fri Apr 12, 2019 6:02 am

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: viewtopic.php?p=11612#p11612
-----
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)
Anthrax101
Posts: 12
Joined: Sat Apr 06, 2019 2:37 pm

Re: How do I get my NPC to function properly?

Post by Anthrax101 » Fri Apr 12, 2019 9:22 pm

So what's the game.nes error?
User avatar
saturdayxiii
Posts: 96
Joined: Wed Oct 31, 2018 4:03 pm
Location: Canada
Contact:

Re: How do I get my NPC to function properly?

Post by saturdayxiii » Fri Apr 12, 2019 9:24 pm

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.
game things
Mr. Spooks Tall House (mostly broken demo)
Pingback (mostly working demo)
other things
https://saturdayxiii.tumblr.com
User avatar
dale_coop
Posts: 3486
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: How do I get my NPC to function properly?

Post by dale_coop » Sat Apr 13, 2019 11:33 am

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.
-----
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)
Anthrax101
Posts: 12
Joined: Sat Apr 06, 2019 2:37 pm

Re: How do I get my NPC to function properly?

Post by Anthrax101 » Sat Apr 13, 2019 2:10 pm

So this is a bug?
User avatar
dale_coop
Posts: 3486
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: How do I get my NPC to function properly?

Post by dale_coop » Sat Apr 13, 2019 5:42 pm

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 ;)
-----
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)
Anthrax101
Posts: 12
Joined: Sat Apr 06, 2019 2:37 pm

Re: How do I get my NPC to function properly?

Post by Anthrax101 » Mon Apr 15, 2019 9:12 pm

these are the scripts
Attachments
Screenshot (11).png
Screenshot (11).png (310.92 KiB) Viewed 178 times
Screenshot (10).png
Screenshot (10).png (293.23 KiB) Viewed 178 times
User avatar
dale_coop
Posts: 3486
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: How do I get my NPC to function properly?

Post by dale_coop » Tue Apr 16, 2019 8:26 am

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.
-----
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)
Anthrax101
Posts: 12
Joined: Sat Apr 06, 2019 2:37 pm

Re: How do I get my NPC to function properly?

Post by Anthrax101 » Tue Apr 16, 2019 10:22 am

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.
Post Reply