This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ff3:ff3us:tutorial:events:action [2018/05/06 16:33] lockirby2 |
ff3:ff3us:tutorial:events:action [2019/02/12 10:38] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
One question that you may have been asking yourself is "How do I make the characters move?" | One question that you may have been asking yourself is "How do I make the characters move?" | ||
- | ===== Starting an Action Queue ===== | + | ==== Starting an Action Queue ==== |
Starting an action queue works just like executing any other event command, although the number of parameters can vary depending on how many actions you want the character to take. Any command between $00 and $34 will start an action queue for one character. | Starting an action queue works just like executing any other event command, although the number of parameters can vary depending on how many actions you want the character to take. Any command between $00 and $34 will start an action queue for one character. | ||
Line 10: | Line 10: | ||
* $10 - $2F: Non-player characters. | * $10 - $2F: Non-player characters. | ||
- | {{: | + | {{ : |
- | {{: | + | {{ : |
* $30: The camera. | * $30: The camera. | ||
* $31 - $34: The characters in the party. | * $31 - $34: The characters in the party. | ||
- | ===== The Second Byte ===== | + | ==== The Second Byte ==== |
The main purpose of the second byte is to tell the game how long the action queue will be. Most of the time, you should decide what actions you want to put in the queue before filling in this byte. You can have up to $7F (127 in decimal) actions in a queue, but it's unlikely that you will need anywhere near that many. | The main purpose of the second byte is to tell the game how long the action queue will be. Most of the time, you should decide what actions you want to put in the queue before filling in this byte. You can have up to $7F (127 in decimal) actions in a queue, but it's unlikely that you will need anywhere near that many. | ||
Line 22: | Line 22: | ||
This byte also allows you to tell the game whether you want to finish the character' | This byte also allows you to tell the game whether you want to finish the character' | ||
- | ===== The Actions | + | ==== The Actions ==== |
This is the meat of the action queue, containing the actions that you want the character to perform. | This is the meat of the action queue, containing the actions that you want the character to perform. | ||
- | By default, a character will actually take footsteps when they are told to move somewhere. | + | By default, a character will actually take footsteps when they are told to move somewhere. |
You should also take note of the $E0 command. | You should also take note of the $E0 command. | ||
Line 32: | Line 32: | ||
All action queues need to be ended with the $FF command. | All action queues need to be ended with the $FF command. | ||
- | ===== Our First Action Queue ===== | + | ==== Our First Action Queue ==== |
It's finally time to fix the repetition of the cutscene. | It's finally time to fix the repetition of the cutscene. | ||
Line 45: | Line 45: | ||
{{: | {{: | ||
- | ===== A Larger Example | + | ==== A Larger Example ==== |
Right now, the event uses a red flash to indicate that the guards are approaching. | Right now, the event uses a red flash to indicate that the guards are approaching. | ||
Line 53: | Line 53: | ||
The NPCs aren't easily noticed because they are all in the top-left hand corner. | The NPCs aren't easily noticed because they are all in the top-left hand corner. | ||
- | {{: | + | {{ : |
Now we can cross-reference this with the Event Commands Document, which states that we can use $10 to move NPC #0 and $11 to use NPC #1. We will need to create a separate action queue for each of the two guards. | Now we can cross-reference this with the Event Commands Document, which states that we can use $10 to move NPC #0 and $11 to use NPC #1. We will need to create a separate action queue for each of the two guards. | ||
Line 90: | Line 90: | ||
=== Finishing up === | === Finishing up === | ||
- | Now that we have the action queues | + | Now that we have the action queues sorted out, we need to look at some of the nuts and bolts to make it all work. Before the action queues are started, the NPCs need to be " |
- | After the queues have been run, there is one issue to be sorted out. We want to wait for both guards to reach the player before initiating the dialogue box. | + | After the queues have ended, there is one issue to be sorted out. We want to wait for both guards to reach the player before initiating the dialogue box. |
Finally, we want to erase the NPCs after the battle is fought. | Finally, we want to erase the NPCs after the battle is fought. |