| Custom coin spawns a key |
|
Forum Index - SMW Hacking - General SMW Hacking Help - Custom coin spawns a key |
|
Pages: 1  |
|
|
|
| Posted on 2012-02-26 12:46:26 PM |
Link | Quote |
|
Hi there, I'm using those blocks (more specifically, the 5-coins one). I make it act like tile 25 and test. When I touch it, it gives me 5 coins, BUT it changes into a brown block and spawns a key.
I am using the 4-digits coin counter, if it makes any difference.
EDIT: It only happens if I hit it from below.
EDIT2: If fixing it means to disable POW effect compatibility, I don't care, because I can't use multicoins in levels with a blue POW anyway (they would change into a brown block while normal ones would become brick blocks).
|
| Last edited on 2012-02-26 12:53:16 PM by King Dedede. |
|
| Posted on 2012-02-26 12:51:56 PM |
Link | Quote |
|
|
Sounds to me like the block isn't preserving the Y index properly in its code, making the block act like 125 instead of 025. Adding a PHY at the start of the code and a PLY before every return statement ought to fix it.
|
|
| Posted on 2012-02-26 01:01:48 PM |
Link | Quote |
|
What do you mean by return statement? I tried putting a PLY before every RTL and the branching command that goes to the return label, but it didn't fix it. As for the PHY, does it goes at the VERY beggining or after the wall of JMP?
EDIT: Asking it because whatever I try, it doesn't fix it AND if I touch it from NOT below, the game crashes.
|
| Last edited on 2012-02-26 01:05:10 PM by King Dedede. |
|
| Posted on 2012-02-26 01:07:09 PM |
Link | Quote |
|
|
Putting a PLY before every RTL is enough; putting them before branching commands would probably crash the game (which apparently was the case.)
|
| Last edited on 2012-02-26 01:12:18 PM by WhiteYoshiEgg. |
|
| Posted on 2012-02-26 01:29:39 PM |
Link | Quote |
|
Doesn't crash now, but the problem still isn't fixed.
Here's my code: here.
I don't understand what wouldn't work...
EDIT: Oh and I got it by other means. The block I was using was submitted by Alcaro and made by InfiniteCoinBlock, but in the actual file it states to be made by Iceguy. Well, I found another block, by Iceguy, that has the EXACT SAME description at the top of the file, except that this one works. So, well... That's it.
|
| Last edited on 2012-02-26 01:55:34 PM by King Dedede. |
|
| Posted on 2012-02-26 02:41:52 PM |
Link | Quote |
|
I think here's the problem:
Code;this is so that a glitter effect is played when collecting
;a coin
LDA $7F
ORA $81
BNE return
LDY #$03
You need to put the PHY before the LDA $7F, and the PLY after this:
CodeADDR_00FD97:
LDA #$10
STA $17CC,Y
Just after the STA $17CC,x.
|
| Last edited on 2012-02-26 02:43:41 PM by New Hacker. |
|
|
Pages: 1  |
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - Custom coin spawns a key |