Banner
Views: 240,463,995
Time: 2013-06-18 06:09:06 PM
17 users online: aj6666, Akireyano, cpuHacka101, Falconpunch, leictreon, leod, levelengine, Ma-Ri-Oh, mario and luigi, MarioBros980, ninja boy, One two three, Pixels, RaindropDry, o RPG Hacker, o ShadowPhoenix, tylersuperwiigamer - Guests: 26 - Bots: 25Users: 23,078 (1,326 active)
Latest: Ma-Ri-Oh
Tip: If you give the player a cape, be sure they can't cheat and fly over the level with it!
Custom coin spawns a key
Forum Index - SMW Hacking - General SMW Hacking Help - Custom coin spawns a key
Pages: « 1 »
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.
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.
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.
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.
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.
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:

Code
ADDR_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

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

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 27

Menu