Moving Platforms

Tutorials for Call of Duty mapping

Moderator: Core Staff

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » April 14th, 2006, 1:53 pm

Ah ok, well it runs fine when I don't have developer mode on hehe.
Image
Image

User avatar
ODD
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: March 14th, 2006, 4:19 am
Location: Illinois, U.S.A.
Contact:

Post by ODD » June 28th, 2006, 1:28 pm

Okay, well I know absolutely nothing about GSC but let me just state what I think I get out of this syntax, for my own clarification. I'm making these guesses based on the syntax of other scripting languages I've used in the past for other things.

Okay, I'm guessing in the first gsc file, those lines are the syntax for executing external scripts and the ::main() tells it to execute the main function in that script.

In the second (I might repeat something that NM said in the pic, sorry) thread is the command to execute a function within the same gsc file. platform1() is just naming the function i guess, and the curly brackets are supposed to contain the code and tell it that it's all the same function. 'platform = getent ("platform1","targetname");' must be the way to assign variables.

while(1) I know is a loop operator because I've seen that in a few other scripts. (1) must just tell it to loop it only once at a time

platform is the variable and moveY is the operator for moving it upon the Y-Axis i suppose

wait(5) tells it to wait 5 milliseconds before moving it back which is the next line
i guess waittill is operator for waiting till a function is completed, and movedone must be that function :D

the next bracket closes the loop
the next bracket closes the function

Tell me how wrong or right I am please :D
Image
ODD

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » June 28th, 2006, 2:12 pm

Arrekusuof93 wrote:Okay, well I know absolutely nothing about GSC but let me just state what I think I get out of this syntax, for my own clarification. I'm making these guesses based on the syntax of other scripting languages I've used in the past for other things.
CoD Script is roughly the same as C/C++ and Java.
Okay, I'm guessing in the first gsc file, those lines are the syntax for executing external scripts and the ::main() tells it to execute the main function in that script.
Yes, if you see a path to another gsc e.g "maps\mp\_load" that is the name and location of a GSC called "_load", the following parts "::main()" tell the script to look for the function "main()"
In the second thread is the command to execute a function within the same gsc file. platform1() is just naming the function i guess, and the curly brackets are supposed to contain the code and tell it that it's all the same function. 'platform = getent ("platform1","targetname");' must be the way to assign variables.
thread is a command to execute a function without disturbing the current function. If you do not thread the functions then the scripting will wait until the function has finished before it continues.
getent, is a way of assigning an entity to a variable.
while(1) I know is a loop operator because I've seen that in a few other scripts. (1) must just tell it to loop it only once at a time
while is a loop and whatever you put inside the () will tell the loops how to loop...
1 is another way of saying true, basically, while(1) is an infinite loop.
platform is the variable and moveY is the operator for moving it upon the Y-Axis i suppose
correct.
wait(5) tells it to wait 5 milliseconds before moving it back which is the next line
i guess waittill is operator for waiting till a function is completed, and movedone must be that function :D
Seconds, not milliseconds. you can use decimals for milliseconds, e.g 0.05
the next bracket closes the loop
the next bracket closes the function
Yep, anything you open with curly brackets must be closed. same goes for, (, [, ", /* */,
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
ODD
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: March 14th, 2006, 4:19 am
Location: Illinois, U.S.A.
Contact:

Post by ODD » June 29th, 2006, 2:57 am

Thanks, Drof, I understand GSC a little better now. I've never actually worked w/ Java or any C languages. I was comparing this w/ my knowledge of the web-based scripting language JavaScript.
Image
ODD

jumpz.coldfire
CJ Fan
CJ Fan
Posts: 173
Joined: May 19th, 2006, 8:59 pm
Location: Netherlands /// Limburg

Post by jumpz.coldfire » July 2nd, 2006, 2:18 pm

lol diffecult :S:S:P

Cold 8)

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » July 3rd, 2006, 2:22 pm

not really once your used to it
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

moving platforms

Post by HavoC » October 18th, 2006, 1:21 am

ok,, good tut but i wanna dl the .map file but i couldnt get to it,, it goes to a website but it says it could not be found?

steveuk
CJ G0D!
CJ G0D!
Posts: 1330
Joined: November 21st, 2006, 12:51 pm

Post by steveuk » February 12th, 2008, 4:12 pm

Would this ba a moving platform where the elevator moves side to side, forward & backwards, or up and down, i need one where it goes forward & Backwards. if i get to add it in my Cod4 jump map Project.. see here
.

http://codjumper.com/forums/viewtopic.php?p=67273#67273

Steve

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests