Banner
Views: 873,863,458
Time:
28 users online: AmperSam,  Anorakun, buggy789, crowhander, Daizo Dee Von,  Deeke, dreamycarnival, Far, HammerBrother, Hayashi Neru, hoagie, Infinity, Insanit, K.T.B., Koopster, l337f00l, LadiesMan217, Mario is the best, Mega, mio, MistaX88, OnlySpaghettiCode, Qwerty13x, Rilla Roo,  Teows, Zandro, Zeldara109, Zerio - Guests: 64 - Bots: 88 Users: 48,669 (2,414 active)
Latest: crowhander
Winter C3 2021 Content Spotlight
tcdw's 4 Ports!
Not logged in.
Homing Sprite code
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Homing Sprite code
Pages: « 1 » Link
What code used when sprite follow mario??
(Assuming you have SUB_HORZ_POS in your sprite's .asm file)

JSR SUB_HORZ_POS
TYA
STA $157C,x
Quote
JSR SUB_HORZ_POS
TYA
STA $157C,x


That basically updates the direction to face mario all the time (as long as it's in the MAIN routine), you can just set a speed. Note: get SUB_HORZ_POS from another sprite.

EDIT: Curse my slow typing!

--------------------

Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Homing 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