An issue with walk top or down ?

dale_coop

Moderator
Staff member
I finished watching all the tutorial videos of the Pi beta (wow great work, Joe)... so I tried some screens for a platform game, yeah! it's very nice <3
I don't know if we say it enough, but it's a great tool, it's very powerful, well made and a pleasure to use! Congrats guys<3

So, now I try to make a topdown game, to see what have changed (since the last beta), and how to do now. And I can't find how to move the player top or down...
I think now the "press_xxx.asm" scripts just change the state the player and do not move the player anymore, I suppose it's now the "hold_xxx.asm" scripts that actually do that. So moving left and right work well...

But I can't use hold_top and hold_down scripts. When I add them to the project, it doesn't compile, I got errors "Hold_down.asm(8): Unknown label" and "Hold_up.asm(7): Unknown label." (like the one in the platform game tutorial video)


input_editor.png


I might be doing wrong here.
Joe (or someone else) to you help me with that ?

Thanks, guys :)
 

RadJunk

Administrator
Staff member
You may be correct (i may have pushed some things for the platformer specifically), however, did you get into the Scripts editor and choose the top down scripts for the physics, collision, and bounds scripts?
 

MistSonata

Moderator
I don't know specifically what's wrong, but if you look at the numbers in parenthesis, that's the line number where the error was found in that script, so if you go into that script you'll find that both errors are referring to the code "JSR changeStateToWalk_ifIdleAndNotHurt" or "Jump to the SubRoutine labelled changeStateToWalk_ifIdleAndNotHurt". If you search for "changeStateToWalk_ifIdleAndNotHurt" in the GameEngineData directory, you'll see that the subroutine appears in UserSubroutines.asm. Try making sure that that script is loaded into your "Code Scripts" folder in NESmaker.

EDIT: And yes, check your script settings in the project labels window too.
 

RadJunk

Administrator
Staff member
What would make sense based on the info here is that those labels are NOT present in the platform game scripts, so the wrong "module" is loaded, thus it can't find those labels in the code.

That's why I added THIS video to the playlist, since it's a new thing since the last beta: https://www.youtube.com/watch?v=P277HsCusNs&t=96s

:)
 

dale_coop

Moderator
Staff member
My script settings in the project labels window are top down ones (default ones, new project folder).

I will try to dig in the code to see what is the problem, but I would definitely be happy if someone else can reproduce the problem or can make his player walk in those directions without issue ;)
 

dale_coop

Moderator
Staff member
After verified, as MistSonata wrote, the problem is the call of the "changeStateToWalk_ifIdleAndNotHurt" subroutine in the "hold_up.asm" and "hold_down.asm".
This subroutine doesn't exist (anymore), might have been rename to "changeStateToWalk_ifIdleAndNotHurtAndNotJump" (as being called in the "hold_left.asm" and "hold_right.asm" scripts).

If I change :
Code:
JSR changeStateToWalk_ifIdleAndNotHurt
to
Code:
JSR changeStateToWalk_ifIdleAndNotHurtAndNotJump

the project compilation is OK, and the player is moving in the directions wanted <3
 

RadJunk

Administrator
Staff member
Awesome that you are able to tech the issues! Yes, I forgot that I made this change for the platform tutorial!
 

dale_coop

Moderator
Staff member
Yeah, the more I use NESMaker, the more I learn. It's very instructive. You can make a small change, a tweak and see immediately the consequences, the effet in the game :)
Thanks to you!
 
Top Bottom