Banner
Views: 875,018,297
Time:
10 users online: anonimzwx, crm0622, Dark4ssass1n, DJLocks, Infinity, JX444444,  Katerpie,  KevinM, OnlySpaghettiCode, raiden87 - Guests: 69 - Bots: 61 Users: 48,790 (2,457 active)
Latest: xmariedetx
Winter C3 2021 Content Spotlight
Sweetdude's "Things.smc" Trailer!
Not logged in.
Floating sprite code
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Floating sprite code
Pages: « 1 » Link
What's code used in sprite for floating??
What do you mean by floating?

Do you want Mario to be able to stand on it?
Do you just want the sprite to not be affected by gravity?
Or something else?
Enemy floating,understood?
All you need to do is STZ the sprites Y speed like this...


STZ $AA,x

(or maybe Y was $B6,x)

--------------------
I own a community of TF2 servers!

ASMT - A new revolutionary ASM system, aka 65c816 ASseMbly Thing
SMWCP - SMW Central Presents a Product- tion long name

frog

http://esolangs.org/wiki/MarioLANG
The Y is $AA,x.

However, if the sprite is in the air, the Y speed will continue to rise downward. To get around this, I generally store my desired Y speed to another table (like $C2,x) and update it every frame, but there's probably a way to not have sprites affected by gravity at all. I haven't bothered to check.
Originally posted by Kaijyuu
there's probably a way to not have sprites affected by gravity at all. I haven't bothered to check.

Yes, there is: instead of calling $01802A to update the sprite's position, call $01801A and $018022 (known as UpdateYPosNoGrvty and UpdateXPosNoGrvty in all.log) separately.

EDIT: numbers are fun

--------------------
My YouTube channel
Get the official ASMT resource pack here!

*$01801A

If you meant making a sprite float on water, well...Sonikku uses $164A,x to check if the sprite is in water or lava. You could use that...LDA $164A,x BEQ NoFloat should check if the sprite should float or not. Then you just have to adjust the sprite's Y speed from there. If you meant floating in mid-air, then yes, updating the sprite's speed without gravity will work.
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Floating sprite code

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

Copyright © 2005 - 2021 - 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