Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-08-15 12:27:16

Philomathy19
Member
From: New Bark Town
Registered: 2012-08-11
Post 8/15

editing trigger.

I want to know how to edit the trigger can anyone teach me how? I really want to know T.T


Currently Improving my hacking skill
''Love of Learning""

Offline

#2 2012-08-15 15:12:22

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,470/3,508

Re: editing trigger.

A trigger event is pretty simple. When stepped on, it calls a script that uses the same set of commands as person events and signposts, so editing it is the same as a normal script. The only additional thing with trigger events is the "trigger timing" byte. How the trigger timing works is this:

The event checks to see which timing the map is on.
If the timing byte in the event matches the one for the map, the script is run.
Else the event does nothing.

In order to have a trigger do something different at different times, you will have to overlap multiple triggers or have the script check whether flags are set (or a combination of both may be necessary depending on what you are doing.)
The timing byte for a map is stored in a location in RAM. There is a table that determines which maps have timing bytes associated with them. This should be listed in the "Offsets you may find handy" thread. By default, a map's trigger timing will be 0 until you change it with another script.

Offline

#3 2012-08-16 10:30:31

Philomathy19
Member
From: New Bark Town
Registered: 2012-08-11
Post 9/15

Re: editing trigger.

Can you give me example?


Currently Improving my hacking skill
''Love of Learning""

Offline

#4 2012-08-16 11:50:15

Miksy91
Member
Registered: 2010-10-16
Post 1,031/2,317

Re: editing trigger.

triggerd.png

As you can see, the map of New Bark Town (outside) has its [Map Bank] byte as 0x18 (24) and [Map Number] as 0x4 (4).
The trigger table is located in bank 0x25 (starting at 0x94000) and this map is located in that table at 0x94050.
This here means that trigger events can execute a script when you step on one.

These two triggers here use 0 as their Flag meaning that when this map's trigger flag is set to 0, the script, that the trigger event's script pointers points to, will run when you step on either of these trigger events.

You can notice that I not only colored 18 04 but also the two bytes following it, CB D6. D6CB is the ram address where the game stores data of the flag number that is activated at a time. Basically, while you're in Elm's lab getting your first pokemon, sometime during that script the game will write a byte that varies from 00 to D6CB (very likely, 01).

Last edited by Miksy91 (2012-08-16 11:59:47)

Offline

Board footer

Powered by FluxBB