Primary Zelda Hacking

Oracles Hacking => Tutorials => Topic started by: Lin on May 08, 2011, 08:36:43 AM



Title: Creating a Working Lever
Post by: Lin on May 08, 2011, 08:36:43 AM
Okay, this is gonna be a real short tutorial. I'm not gonna go into depth in anything and I'll just give you the general idea. Mue originally attempted this, and while all the code made sense, the script didn't fire when the lever was hit, even though it should've.

So, to start, you're gonna place the lever with the ID 9E, as it is in the overworld with area ID 13. Next, create a type 8 interaction with the ID 501 (It might work with 500, 502, 503, 504, etc...) and place it where the lever is. Then, create a script to fire in the room. You're gonna perform a tile check, and although you would THINK you're checking for the tile 9F, you're not - you're checking for 00.

For some reason, the game replaced the trigger with tile 00 instead of the contrasting lever id. Why, I'm not sure, but here's an example script.

Code:
writelocation FEBE
setinteraction72 2
checktile 33 00 //Check to see if the lever at 33 has been changed (00)
//Action

Not sure for the reason behind these events, but hey, it works fine, so who cares!

~Lin


Title: Re: Creating a Working Lever
Post by: Mue on May 08, 2011, 11:36:07 AM
lmao, did you randomly input 00 and it worked?


Title: Re: Creating a Working Lever
Post by: Lin on May 08, 2011, 07:42:26 PM
lmao, did you randomly input 00 and it worked?
No, I looked at what the tile turned to in the memory and saw it was 00.


Title: Re: Creating a Working Lever
Post by: Jigglysaint on May 08, 2011, 08:11:50 PM
That makes sense because for other "projectile" values, 00 replaces the actual tile, though the graphic still looks normal.  Examples are the crystal switches, people, and owl statues.  In fact, during the event that causes the wall to slide in level 6, the end result actually turns one specific tile from 00 to 0F because during the wall change, the graphics data is written on top of the collision data(so if you moved you could walk over water and walls).  Since the presence of an owl statue means that square is not walkable, the event re-adds the unwalkability.


Title: Re: Creating a Working Lever
Post by: RCHpweblo on April 16, 2014, 03:40:39 AM
Hey, is there more to this script?  Is the example just a script that fixes Mue's script?  If so, do you think that you could post or direct me to the original script?  I have looked every where on the form for it and could not find it!

-Thanks RCHpweblo


Title: Re: Creating a Working Lever
Post by: Lin on April 16, 2014, 10:09:24 PM
Hey, is there more to this script?  Is the example just a script that fixes Mue's script?  If so, do you think that you could post or direct me to the original script?  I have looked every where on the form for it and could not find it!

-Thanks RCHpweblo
No, that is all that's to it. It's just explaining that if you want to check the lever tile to see if it's been switched via script, you need to check for tile 00 instead of the changed lever tile.