Quote:
Originally Posted by Cadelossus
Anyway, if anyone can link me tutorials that deal with scripting cutscene events or explain how they work to me I would REALLY appreciate any help at all.
Thanks in advance !
|
There are two parts to this. The actual cutscene, and the part where the game remembers to have the guy not show up anymore. I'll address both of these in order.
Let's, first off, write the script for the NPC event, and set aside the whole "making him appear and dissapear" for now. From reading your post I am going to assume you already know the basics of scripting, but feel free to ask questions or
view this thread if this is not the case. You should start with a basic shell for your cutscene, something similar to this:
Code:
#dynamic 0x800000
#org @start
lock
faceplayer
'The "meat" of the cutscene goes here.
release
end
So for a message box you use
msgbox @1 0x6 and put your wanted message at
#org @1 (again if you don't understand that command yet read
this. You can put as many of these in a row you you want.
Now we need to talk about movements. You know, stuff like where the game moves the player and other people scripted. In A-Map you need to set the NPC's Person ID to a unique number. This blank is near the bottom and is NOT the Person
Number.
applymovement is the command for the job. For your purpose of having only one NPC that needs to be scripted to move around you can just set the ID to 1 and use
applymovement 0x1 @movements and put the raw code for the movements at
#org @movements (learn about those in
that magical link I keep using.) Please note the person ID for the player is 0xFF, for when you want the player to move during a cutscene. Use these in conjunction with
waitmovement and in between your msgboxes to make a cutscene, then when you are done, you either have the NPC walk off the screen or fade to black with
fadescreen, then hide the person with
hidesprite. Again, details on
that thread.
Now we are going to address the matter of showing/hiding the NPC for when the time is right. It's actually not complicated. If you go to the header tab on an A-Map map, you will see a level script tab. Add a script and set it to
"On Map Entered, Not On Menu Close". Then make a new script in XSE. What this script needs to do is basically use the
showsprite or
hidesprite commands, but only on certain conditions.
What we need is a way to keep track of if you've already done the cutscene. Use a flag or a variable, read about them on this
seperate thread. Use the setflag or setvar commands, then use compare command to check the values of your flag/variable. diegoisawesome's tutorial explains those commands in detail. Then, in your level script, based on your compare use showsprite or hidesprite depending on what your flags mean to you. The NPC's cutscene can't be activated if the NPC is hidden, so you don't need to put these checks in the actual cutscene script itself, just the level script that shows or hides your NPC.
Hopefully this nudges you in the right direction.