Banner
Views: 874,658,957
Time:
20 users online: Albert1234, Arcten, BreadEater, chickaDEE Magazine, Darolac, Diba9Br, EMT112, Fermín Acosta Jr., FrozenHydra, FrozenQuills, Fryinb, iSwaggMaster, Jazzman287,  KevinM,  MarioFanGamer, Mathos, MMaxwell, slopcore, WhiteYoshiEgg, Zandro - Guests: 83 - Bots: 71 Users: 48,740 (2,438 active)
Latest: jerebatata_
Not logged in.
Telekey won't work!
Forum Index - SMW Hacking - SMW Hacking Help - Telekey won't work!
Pages: « 1 » Link
!
Care to give us more information than that? If you'd like people to help you, describe your problem as detailedly as possible.

I can see what's wrong though - you're trying to insert that as an ASM file, aren't you? Looks like that block is meant to be assembled with TRASM and inserted as a BIN file.

Either way, here's the proper format - haven't tested it though.

Code
JMP M : JMP M : JMP M : JMP R : JMP R : JMP R : JMP R


!TELEITEM = $80  ;The sprite number. Change it to any >>>carryable<<< sprite to teleport with that sprite

M:
PHX
PHY
PHA
LDX #$00

Loop:
LDA $9E,x
CMP #!TELEITEM 
BNE NoMatch
LDA $14C8,x
CMP #$0B
BNE NoMatch
BRA Teleport

NoMatch:
INX
CPX #$0C
BEQ Return
BRA Loop

Teleport:
SEP #$30
LDA #$06
STA $71
STZ $89
STZ $88

Return:
PLA
PLY
PLX
R:
RTL


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


 
It still doesn't work...

Anyway, I was really stressed and I had to run to my piano lesson, so I didn't have much time! Sorry :(

Here's the problem:
When I walk to it without key, everything gets black except for Mario and the game freezes.

When the key toutches it itself, the screen turns black and the game freezes.

When Mario and the key toutches it, random stuffs happens...

You hear a spinjump sound and everything gets black and freezes, the screen get's black and freezes, everything except for Mario get's black and freezes, everything except for Mario and the FG freezes, pink colour comes ect.

^
|

Also, when Mario and the key toutches it, something above happens.
Happens to me too. I don't know what the crap is making this...
LINKS Twitter | YouTube | SoundCloud | Fortaleza Reznor
to hear birds and see none.
WYE uses R but Return as a other label >,<'

Change "Return:" to R: and it should fix the block...
JMP M : JMP M : JMP M : JMP R : JMP R : JMP R : JMP R


!TELEITEM = $80 ;The sprite number. Change it to any >>>carryable<<< sprite to teleport with that sprite

M:
PHX
PHY
PHA
LDX #$00

Loop:
LDA $9E,x
CMP #!TELEITEM
BNE NoMatch
LDA $14C8,x
CMP #$0B
BNE NoMatch
BRA Teleport

NoMatch:
INX
CPX #$0C
BEQ Return
BRA Loop

Teleport:
SEP #$30
LDA #$06
STA $71
STZ $89
STZ $88

Return:
PLA
PLY
PLX
R: "R" is already hear!!!
RTL



Also:
It kind of work when I delete the "R:" and replace "return" with an "R"...
I works correctly at the top and bottom, but not from the sides or just the key...
I see with my little eye, something suspicious.

Teleport:
SEP #$30
LDA #$06
STA $71
STZ $89
STZ $88

Why is there a SEP #$30 there when there isn't a REP #$30 at all before that? Get rid of the SEP #$30 and see if it works.
I change my layout every 4-5 months
The SEP #$30 shouldn't be a problem on its own but it's redundant so you should remove it anyway.

Also, I just tested this block and it seems to be working fine for me (when Mario touches it from above, below and the sides when he's holding the key). If you want the block to be activated by just the key itself, check the sprite # and sprite state and teleport Mario if they're #$80 and #$09 or #$0A respectively.
Originally posted by Iceguy
The SEP #$30 shouldn't be a problem on its own but it's redundant so you should remove it anyway.

Also, I just tested this block and it seems to be working fine for me (when Mario touches it from above, below and the sides when he's holding the key). If you want the block to be activated by just the key itself, check the sprite # and sprite state and teleport Mario if they're #$80 and #$09 or #$0A respectively.


Actually, I already figured out the SEP part, but for the other:

It works for me when Mario toutches it and when Mario and the key toutches it, but not when just the key toutches it...

The sprite #. What is that?
The sprite number, i.e. !TELEITEM.

Try this code. I cleaned it up a bit and made it teleport when a key is thrown at it:

Code
JMP M : JMP M : JMP M : JMP F : JMP F : JMP R : JMP R


 !TELEITEM = $80 ;The sprite number. Change it to any >>>carryable<<< sprite to teleport with that sprite

 M:
 LDX #$00

 Loop:
 LDA $9E,x
 CMP #!TELEITEM 
 BNE NoMatch
 LDA $14C8,x
 CMP #$0B
 BNE NoMatch
 BRA Teleport

 NoMatch:
 INX
 CPX #$0C
 BNE Loop

 Teleport:
 LDA #$06
 STA $71
 STZ $89
 STZ $88
 R:
 RTL

 F:
 LDA $14C8,x
 CMP #$09
 BEQ +
 CMP #$0A
 BNE R
 +
 LDA $9E,x
 CMP #!TELEITEM
 BNE R
 JMP Teleport
Thank you!
But now it teleports if Mario toutches it without the key and if he's carrying it.

#w{:s}
Originally posted by Iceguy
BNE Loop

Teleport:

Add an RTL between these two.

--------------------
<blm> zsnes users are the flatearthers of emulation
YEEEEEES
NOW IT WORKS!!!!

It teleports when the key and the "mario carrying the key".


Thanks everyone!
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Telekey won't work!

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