Tram

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Tram

Post by Yarik »

I am working on a map called Tram_Seige. TDM, DM, TOW.
I need someone that can tell me if i can use the elevator TUT to make it go sideways.
2. How can i add a script that when the tram gets to a certain point it will slow down and or stop.?
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

presuming u have the wheels as seperate entities that rotate, you could use something similar 2 this

:tram_move_1
$tram_entity_name time 1
$tram_entity_name moveForward 5
$tram_entity_name waitmove
end

:tram_move_1
$tram_entity_name time 2
$tram_entity_name moveForward 15
$tram_entity_name waitmove
end

:tram_move_3
$tram_entity_name time 3
$tram_entity_name moveForward 30
$tram_entity_name waitmove
end

//hope u get the idea it'll speed up as it moves thro these stages and you can use threads to slow it down etc...

:tram_move_full
thread tram_move_1
wait 1
thread tram_move_2
wait 2
thread tram_move_3
wait 3
thread tram_move_3 //this can b added as many times as you like
wait 3
thread tram_move_2
wait 2
thread tram_move_1
wait 1
end
u can use moveForward moveBackward moveUp moveDown moveLeft moveRight moveNorth moveSouth moveEast moveWest, hope this helps, any other problems if u decide 2 use this technique my Yahoo id's mr_crazy_nugget :D

btw, u might b able 2 use waypoints and drive in the script don't know how this works exactly but some1 else has probably put that by the time i've written all this now :D
hope this helps, prob not cos it's all foreign 2 me :-/
Hunter
First Lieutenant
Posts: 212
Joined: Tue Dec 10, 2002 11:45 am

Post by Hunter »

Did I read your maps name right? tram_seige
Musn't that be siege
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

oh gr8 thsi si smoething wroth notign, ew haev hunter teh onlien dicshunary, no nede 2 worre abote spelling now :D
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

What are you saying?
Live to map, not map to live.
-mohaa_rox, .map
moderator
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Just for Rox :D
nuggets wrote:oh gr8 thsi si smoething wroth notign, ew haev hunter teh onlien dicshunary, no nede 2 worre abote spelling now :D
Oh great this is something worth nothing, we have hunter the online dictionary, no need to worry about spelling now.

Actually spelling is quite an important skill if you wish to pursue a career in computing, e.g. level designer (Some companies prefer enviromental artist).
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Oh, it wasn't foreign language, just some "english".
Live to map, not map to live.
-mohaa_rox, .map
moderator
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

lol, sorry peeps

while scripting spelling is very important and HUNTER would b the ideal candidate,

while typing in a forum it still needs 2 b at least half understandable, sorry again 4 spamming, i hate it when u read a post and seek advice, and end up with conversation like this at the bottom :D

p.s excuse the irony
hope this helps, prob not cos it's all foreign 2 me :-/
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Just a minor thing, rather type 'tram_move_1:' than ':tram_move_1' ;).
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

lol, it seems i'm picking fault with everything u type now... but...

does it make any difference whether when creating threads the : is at the start or the end of the thread name?

battle of the scripters part 3 when i find ur next reply ;) lol
hope this helps, prob not cos it's all foreign 2 me :-/
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Yes, it makes a difference, otherwise when MoH attempts to load the script, you'll have alot of unknown varaibles(MoH might call them something else), i.e. the names after the colon. Also all you threads will be called "". These problems will result in a script error, and your level will not function properly, nor how you intended it to.

The scripting language's syntax states you must have a colon after the thread name, unless you are referencing a thread. Otherwise how would in know which is a reference to a thread, and which is the content of the thread.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

ermmm... yes... ahhh... ok

i've used the : after all threads i've been refering 2 and yet 2 encounter any problems, i don't wanna fight just a little rougha nd tumble should sort it, but i don't know if u'll b able 2 answer these 2,

if :thread_name defines a thread what does thread_name: do if anything


and why on some scripts does it need :: on it, can't remember where i saw it but it confused the hell outta me :D
hope this helps, prob not cos it's all foreign 2 me :-/
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

nuggets wrote:if :thread_name defines a thread what does thread_name: do if anything
Its the other way around, threadName: defines the start of a thread.

nuggets wrote:why on some scripts does it need :: on it, can't remember where i saw it but it confused the hell outta me :D
The only example I could think of, is when you want to call a thread from a different script, i.e. the thread isn't in your level script. In this case you need:

Code: Select all

pathName/scriptName.scr::threadName

e.g.

global/objectives.scr::add_objectives
Often you will see parametes following the thread name. Also note that if you're referencing a thread that is in your level script, you only need to write:

Code: Select all

thread threadName
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

cheers muchly ANGEX that'd also explain why i couldn't get other script threads 2 load in the 1 i am using, cheers again! :D
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply