Language…
11 users online: Cristian Cardoso, howardadam1126, Isikoro, lean4, marvisjj, Oskise, RenkoV2,  Segment1Zone2, Shiki_Makiro, SpacePea, Zavok - Guests: 262 - Bots: 298
Users: 64,795 (2,377 active)
Latest user: mathew

galoomba wake up speed

hello,

i got a idea for a level or more but i can't find the answer anywhere so i hope someone can help me.

i want too change the wakeup time of a goomba ( maybe with a custom sprite because of more galoomba's in 1 level with different timings)

does someone got a solution?



Thanks
MartinMotion :)


There's not currently a Goomba disassembly, so you'll have to modify the original Goomba for that.

Doing so is a bit awkward though, because the "wakeup" timer (commonly referred to as the "stun" timer) has a shared value used for a lot of different sprites. Specifically, it is set in this code here:

Code
SetStunnedTimer:
    LDA.b #$02                  ;$01AA14    |\ 
    LDY $9E,X                   ;$01AA16    ||
    CPY.b #$0F                  ;$01AA18    || Set the stun timer to #$FF if...
    BEQ CODE_01AA28             ;$01AA1A    ||  - sprite 0D (Bob-omb)
    CPY.b #$11                  ;$01AA1C    ||  - sprite 0F (Goomba)
    BEQ CODE_01AA28             ;$01AA1E    ||  - sprite 11 (Buzzy Beetle)
    CPY.b #$A2                  ;$01AA20    ||  - sprite A2 (MechaKoopa) 
    BEQ CODE_01AA28             ;$01AA22    || For any other sprites, set it to #$02.
    CPY.b #$0D                  ;$01AA24    ||
    BNE CODE_01AA2A             ;$01AA26    |/
CODE_01AA28:                    ;           |
    LDA.b #$FF                  ;$01AA28    | How long to stun the four above sprites for when kicked/hit.
CODE_01AA2A:                    ;           |
    STA.w $1540,X               ;$01AA2A    |
SetAsStunned:                   ;           |
    LDA.b #$09                  ;$01AA2D    |\ Change to stationary/carryable status.
    STA.w $14C8,X               ;$01AA2F    |/
    RTS                         ;$01AA32    |

You can see that the Goomba shares its value with the Bob-omb, Buzzy Beetle, and MechaKoopas. You'll have to write a hijack to this code that changes the amount for only the Goomba, but not the other three.

If you don't care about the other three though, you can change them all together by just changing that "LDA.b #$FF" value, like so:

Code
org $01AA29
	db $FF	; reduce this value to shorten the length of time the Goomba is stunned for


Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
wow really thanks!!
iam going to try it !


MartinMotion