Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Vehicle script - Remember Where I Parked.

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Xerian
The one and only in all




Joined: 21 Jul 2003
Posts: 59

PostPosted: Sat Aug 09, 2003 8:06 am    Post subject: Vehicle script - Remember Where I Parked. Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Cube
Dimensional Traveller




Joined: 02 Feb 2003
Posts: 294

PostPosted: Sat Aug 09, 2003 8:34 am    Post subject: Reply with quote

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 Wink.
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Aug 09, 2003 11:59 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Xerian
The one and only in all




Joined: 21 Jul 2003
Posts: 59

PostPosted: Sat Aug 09, 2003 10:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Xerian
The one and only in all




Joined: 21 Jul 2003
Posts: 59

PostPosted: Wed Aug 13, 2003 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Thu Aug 14, 2003 1:38 am    Post subject: Reply with quote

Big grin AHHHHHHH! Someone stole my @#&^in' car!

*pulls out shotgun*

Eat lead, SLACKERS!
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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