crouch enable

vasge_

New member
Mugi said:
to set "skip top collision"
Code:
    LDA Object_vulnerability,x
    ORA #%10000000
    STA Object_vulnerability,x

to remove "skip top collision"
Code:
    LDA Object_vulnerability,x
    AND #%01111111
    STA Object_vulnerability,x

Hey, sorry for ressurecting such an old post, but I'm having some trouble implementing this skip top collision code... I understood it as I'm supposed to add these lines to my "StartCrouch" and "StopCrouch" scripts respectively, is that correct? But even when I do that, nothing really changes...
 

Jonny

Well-known member
Hi, I'm trying to make my player crouch as above. I've set everything up as mentioned by Dale (I think). I wasn't sure if I should reply to this thread or create a new one. I've basically followed whats above. This is what happens...

- If I press down nothing happens.

- If I jump, then press down in mid air my player lands to a crouch.

- If I jump again without going left or right, I crouch on landing without pressing down again.

I'm not wanting to crouch and crawl. Just duck, like ducking bullets. I'm using scrolling platformer not simpleplatformer as above. Maybe thats why?

https://youtu.be/Xhc3Qvd5DFY
 

dannunziod

New member
hello, I am very new I did go through all the tutorials and I am experimenting with things.
I was trying to add a script for the crouch and I went into project settings>Script settings and clicked "Add" then found a blank script to copy paste the codes for crouch that I saw on this forum.
I repeated for Stopcrouch as well. I added to idle animation>downright>downleft etc. Then I went to input scripts and added them by finding the script from where i saved the code.
It wasnt working. It said something like "Codetarget" and name not found. So i figured i did something wrong so I removed the Startcrouch and Stopcrouch. So i must have added the script wrong. That was going to be my question to see what i was doing wrong, but now there is something else I did worng:

Now, I can't even load my test game to start. I get the error shown in the screenshot.
Any ideas what i did?
I loaded the project and must of saved by mistake after i messed up because it still gives me the error.

Any help would be appreciated. i have no idea what I did.
Thank you so much.
NES maker error 1.png
 

dale_coop

Moderator
Staff member
Dannunziod, remove all the script YOU added in the Project Settings > Scripts Settings...
The script needs to be added in the Scripts > Inputs Scripts (in the treeview, on the main NESmaker window)

I'd suggest you to watch again ALL the tutorial videos ;)
 

dale_coop

Moderator
Staff member
Jonny... You might have done something incorrect.
Could you share screenshot of how you set that?
And share your scripts too? and how you assigned them to the Input Editor?
 

dannunziod

New member
Dale,
Ok cool, so I add the new script in this case to input settings only. Makes sense.
I know, I am getting ahead of myself, I am watching the videos, I am also excited to use the program.
Thank you so much! Take care
 
I was able to implement the crouch, thanks for the scripts and methods. I though at first I'd need an action step for crouching but realized it's in the idle action step that I set up the animation on the down left and down right position to the crouching animations. I was also able to do the same for Attack while crouching.

There's one point where I had a collision of some kind with a block and my player tiles became messed up, all animations would become a random patchwork of 8x8 tiles, as if the graphics memory bank becomes messed up if you crouch into a collision. It has not happened again since I added the ignore top collision scripts, but it might happen I guess if you have a character that is in a tunnel and from there tried to stand up 'into' the ceiling.
 

mouse spirit

Well-known member
Hey everyone,thanks for all the wonderful help here.I have an issue though. When player1 is facing left and i release down(crouch) player1 stays crouched.It does not happen while facing right,you simply return to a standing idle animation.I'm sure it's simple but i'm not understanding my mistake.Any help is appreciated.
Also i noticed if i attack while crouched in either direction,i stay crouch.I'm guessing i want to reset to a standing idle when on ground and not pressing any buttons,but would like to know what i'm doing wrong to begin with.

Edit: My digits were wrong in stop crouch! So it wasn't
comparing correctly.
 

mouse spirit

Well-known member
vasge_ said:
Mugi said:
to set "skip top collision"
Code:
    LDA Object_vulnerability,x
    ORA #%10000000
    STA Object_vulnerability,x

to remove "skip top collision"
Code:
    LDA Object_vulnerability,x
    AND #%01111111
    STA Object_vulnerability,x

Hey, sorry for ressurecting such an old post, but I'm having some trouble implementing this skip top collision code... I understood it as I'm supposed to add these lines to my "StartCrouch" and "StopCrouch" scripts respectively, is that correct? But even when I do that, nothing really changes...

Same here. Started a more specific one for my needs
http://www.nesmakers.com/viewtopic.php?f=60&t=5476
 

Otterbits

New member
It appears as though this script does not work in 4.5 (the macros have different names now for one thing). I tried changing the name of the macros but it still doesn't work. Does anybody have a fix for 4.5?
 

vanderblade

Active member
It appears as though this script does not work in 4.5 (the macros have different names now for one thing). I tried changing the name of the macros but it still doesn't work. Does anybody have a fix for 4.5?
I don't think anybody has publicly shared how to make the crouch (skip top collision) work in 4.5.x. I'm working on implementing it in my new project. I have everything working on the animation end. I just need to figure out how to skip top collision when I hold down to activate my crouch action step. The old ways are no longer hard-coded in.
 
para definir "pular colisão superior"
[código]
LDA Object_vulnerability, x
ORA #% 10000000
STA Object_vulnerability, x
[/código]

para remover "pular colisão superior"
[código]
LDA Object_vulnerability, x
E #% 01111111
STA Object_vulnerability, x
[/código]
Amazing!!! where do i put these codes?
 
Top Bottom