Primary Zelda Hacking
April 21, 2014, 09:21:40 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Current Zelda Oracles Hacking Suite beta version: 0.05
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Creating a Working Lever  (Read 552 times)
Lin
ZOLE Creator
Administrator
Hero Member
*****
Offline Offline

Posts: 580



View Profile
« 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
Logged
Mue
Newcomer
*
Offline Offline

Posts: 23


View Profile
« Reply #1 on: May 08, 2011, 11:36:07 AM »

lmao, did you randomly input 00 and it worked?
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Offline Offline

Posts: 580



View Profile
« Reply #2 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.
Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #3 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.
Logged
RCHpweblo
Newcomer
*
Offline Offline

Posts: 1



View Profile
« Reply #4 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
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Offline Offline

Posts: 580



View Profile
« Reply #5 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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!