Language…
7 users online: Bensalot, BSideTartarus, Green Jerry, GrenCarret, katun24, Tokiko, Zavok - Guests: 67 - Bots: 110
Users: 56,342 (2,197 active)
Latest user: atliylol

Official Hex/ASM/Etc. Help Thread

  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
I recommend you to move PHX</ocde> and PHY</ocde> in front of %sprite_block_position() because the routine at $07FC3B, which is called afterwards, is using Y and Y is also used to determine the high byte i.e. page of the Map16 acts like, causing the block to act like tile 125 (I assume the normal acts like is tile 25).
Unexpected end tag (</ocde>) at 40, expected </code>
Unexpected end tag (</ocde>) at 61, expected </code>
Tag (code) was not closed.
Tag (code) was not closed.
I am trying to make a sprite that does something a few seconds after touching it but I've ran into a problem that I can't seem to fix. For some reason, the timer only works if you stay inside the sprite.

Code
	JSL $01A7DC|!BankB
	BCC Return

	INC !1602,x			; set timer
	LDA !1602,x			; load timer
	CMP #$20			; \ branch when it reaches a set value
	BNE ++				; /


Can someone explain what I'm doing wrong?
Don't eat the sandwich
Originally posted by RollingRigatonis
Code
	JSL $01A7DC|!BankB
	BCC Return

This branch means that everything between it and the "Return" label only runs when you touch the sprite. (Apparently including all your timer and effect code.)

Try something like this instead:
- use a timer that counts down until it reaches zero, then stays at zero. (There are a handful of unused sprite addresses that have this behavior already built in.)
- when you touch the sprite, and the timer is zero, set it to some value (e.g. #$20). This is the only thing you need in your "when you touch the sprite" section.
- when the timer is at 1, do the thing you want. This check should run all the time, not only when you touch the sprite. The reason you check for 1 instead of 0 is to make sure the thing is only done for one frame.


 
I don't know if anyone can help me, but I wanted to put the "Kirby Bomb Blocks" interaction (the Bomb Block exactly) to explode when Mario touches it from above, but I don't know how to do that as much as knowing ASM. In my hack I wanted to do like a cutscene where Mario falls off a fake bridge into a hole, and teleports him to a cave. Thank you very much!
I know making a Custom Boss isn't ideal for someone who's getting into ASM but a last here I am, I'm assuming it has something to do with "BEQ" as there's nothing to match it with. Edit: Nvm I fixed it.


Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Koopa/Bowser final boss for K3SH2, done by Idyllic/Picayune.
; Start date 8/17/2022.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

!Deafeat = $1C ; music to play after koopa dies and the score rolls.

print "INIT ",pc
print "MAIN ",pc
JSR Bossmaincode
RTL

Bossmaincode:
JSR BootlegGraphics

LDA #$00
%SubOffScreen()


JSL $01A7DC
BEQ TehGoat

TehGoat:
JSL $03A6C8
LDA #$FF
STA $1493
LDA #!Deafeat
STA $1DFB
STA $13C6
LDA #$FF
RTS

BootlegGraphics:
%GetDrawInfo()
Complete noob question, but I've been trying to find/make a block that can only be destroyed by throw blocks.

All similar blocks I've found on the site aren't really what I'm looking for. Some have throw blocks pierce them, which I don't want, and all of them act strangely whenever you toss a throw block up into them (destroys the blocks, pierces, and doesn't get rid of the throw block).

I'm just looking for a block that will break whenever a throw block is kicked into it, having the throw block break as well. I also wouldn't want the throw block to break anymore than a singular block. And if you kick a throw block upwards, it will break both the block and the throw block.

If this is already a thing someone's uploaded I'm sorry, but it would be amazing if someone could either link me an already existing block, or help me with the coding. I've tried blockreator but for some reason I just can't get what I want down : /
Progress Update!!
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419