 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Xerian The one and only in all

Joined: 21 Jul 2003 Posts: 59
|
Posted: Sat Aug 09, 2003 8:06 am Post subject: Vehicle script - Remember Where I Parked. |
|
|
I know that in Moogle1's plotscripting library James put up these scripts to help keep vehicles parked where they were but I just can't seem to get it to work! I did as the "tutorial" told me but it still won't remember where my vehicles are parked. I did the Map Autorun script to run when the map is loaded... then again I'm not sure how to use the remember where I parked one, but I set it when you go in the vehicle and when you leave so what am I doing wrong? Or is the script just not going to work? I'd appriciate if you'd clear things up for me.
include, plotscr.hsd #language definition
#---------------------------------------------------------
define script (1,Map Autorun,0)
define script (2,Remember where I parked,0)
#---------------------------------------------------------
global variable(1,used vehicle)
global variable(2,vehicle X)
global variable(3,vehicle Y)
global variable(4,used other vehicle)
global variable(5,other vehicle X)
global variable(6,other vehicle Y)
#---------------------------------------------------------
script,Map Autorun,begin
if (used vehicle)
then,begin
# replace the 0 with the NPC number of your vehicle
set NPC position(0,vehicle X,vehicle Y)
end
if (used other vehicle)
then,begin
# replace the 1 with the NPC number of your vehicle
set NPC position(1,other vehicle X,other vehicle Y)
end
end
#---------------------------------------------------------
script,Remember Where I parked,begin
# replace the 0 with the NPC number of your vehicle
set variable(vehicle X,NPC X(0))
set variable(vehicle Y,NPC Y(0))
set variable(used vehicle, true)
# replace the 1 with the NPC number of your vehicle
set variable(other vehicle X,NPC X(1))
set variable(other vehicle Y,NPC Y(1))
set variable(used other vehicle, true)
end
#--------------------------------------------------------- _________________ OHR dies hard. |
|
Back to top |
|
 |
Cube Dimensional Traveller

Joined: 02 Feb 2003 Posts: 294
|
Posted: Sat Aug 09, 2003 8:34 am Post subject: |
|
|
Are those the only 2 scripts you have defined? Well, "used vehicle" and "used other vehicle" probably should be tags rather than global variables. But what I can assume from seeing these scripts is that you're never resetting the "used vehicle" and "used other vehicle" variables. When a variable is defined their number is ALWAYS 0. This is the same thing as saying false, and so the if statement never returns true because those two variables are always false.
Now, what you can do is make a script to turn those two variables to 1 (or true). OR, you can use tags instead. I'm sure that those vehicles won't appear at all times, right? In order to do this you're probably using a tag to turn them on and off. So, in the plotscript use those tags too. I'll assume that when the tags are on the vehicles will appear, so make an if statement like this:
if (check tag (tag number) == on) then (
set the npc position using the global variables that contain the x, y coodinate
)
And then it ought to work. I don't see the point in wasting 2 perfectly good global variables on something like this . |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Aug 09, 2003 11:59 am Post subject: |
|
|
Did you remember to change the npc numbers to the actual numbers on your map? Besides that, I can't think of much that can go wrong.
This script is flawless really... so its probably something in your game. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Xerian The one and only in all

Joined: 21 Jul 2003 Posts: 59
|
Posted: Sat Aug 09, 2003 10:31 pm Post subject: |
|
|
I set the autoscript to run when the map starts, and for the remember where i parked script to run when I land the vehicle... and finally got the thing to work! I'm so friggin glad I solved this problem. As for the variables Cube, I'm not sure exactly what you mean by wasting them, but they seem to actually work out I think...
Anyway, thanks a lot. _________________ OHR dies hard. |
|
Back to top |
|
 |
Xerian The one and only in all

Joined: 21 Jul 2003 Posts: 59
|
Posted: Wed Aug 13, 2003 7:43 am Post subject: |
|
|
I had a problem with my vehicle... disappearing just recently. I set it so that the game would set the position of your ship when you load the game, and I also set the after battle script (in the sea) to continue playing the music after a battle. When I did... my vehicles... disappeared! Why is that it happened when I added the script for after battle and load games? I already solved the problem but I wanna know why did it do it? I solved the problem but I don't know its cause. Could someone help me out? _________________ OHR dies hard. |
|
Back to top |
|
 |
Setu_Firestorm Music Composer

Joined: 26 Mar 2003 Posts: 2566 Location: Holiday. FL
|
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|