Banner
Views: 1,004,017,762
Time:
11 users online: CosmicTiff, Dustyized, grisu, MarioBaggins, MarioSonic4life, Neidave, NGB, OhMuramatsu, SomeGuy712x, Sparx, UTF - Guests: 58 - Bots: 290 Users: 54,867 (2,032 active)
Latest: PPAP
Tip: Doors and pipes act strange near screen boundaries. See this to avoid strange issues.
Not logged in.
Carryable Cement Block Vanishing at Sub-Screen Boundary
Forum Index - SMW Hacking - SMW Hacking Help - Carryable Cement Block Vanishing at Sub-Screen Boundary
Pages: « 1 » Link
Hi all - using this sprite: https://www.smwcentral.net/?p=section&a=details&id=24799

Modified the code as follows:
Code
; ------------------------------ ;
;     Carryable Cement Block     ;
; ------------------------------ ;

!SpriteNum = $2D		; Custom sprite number. Set this to the number you use for the block sprite in PIXI's list.txt.
!Timer = $0		; How long the carryable block will remain so until it turns back into a block. Remains carryable forever if set to 0 (excluding wall hits).

!BlockNumber = $0000		; Map16 tile that the block sprite should change into. If $0000, it will revert back to the Map16 tile number of the block that
							; spawned it (AKA the Map16 tile number you choose for this block).



When I pick up the block, I toss it and it behaves fine. The moment I cross the sub-screen boundary however, it no longer works. I am using it in a vertical level, and I've inserted the EF sprite to prevent horizontal scrolling, but I don't know if that's relevant. I've included a video of it happening. Note that the ground mario lands on at 10s is the sub-screen boundary, so anything below is sub-screen 01.




Any thoughts as to why this might be happening?
I see the problem, it's caused by weirdness in how vertical levels map16 data is handled. You can fix it in two ways:
- Turn the level into a tall horizontal level (LM3 allows for horizontal level to have custom heights so you can replicate the vanilla vertical level dimensions)
- Edit the code to fix this issue. You can do that by going to line 138 in the sprite asm file (right before "LDA !151C,x") and adding this code:
Code
	lda $5B : lsr : bcc +
	lda $99 : xba
	lda $9B : sta $99
	xba : sta $9B
+
Awesome! I edited the code to fix it, since I'm not sure about how to customize level heights. Thanks so much, I literally would have never been able to solve this problem.
Originally posted by dubiousdinobot
I'm not sure about how to customize level heights.

The same way you'd normally change the level mode, but through Horizontal Level Mode instead. Look for level height 1C, which replicates vertical levels like the one you're creating.
That feature's there since LM 3.00.
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Carryable Cement Block Vanishing at Sub-Screen Boundary

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2022 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks