Moving Platforms
Moderator: Core Staff
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
the next bracket closes the loop
the next bracket closes the function
Tell me how wrong or right I am please
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
the next bracket closes the loop
the next bracket closes the function
Tell me how wrong or right I am please
ODD
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
CoD Script is roughly the same as C/C++ and Java.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.
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()"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.
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.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.
getent, is a way of assigning an entity to a variable.
while is a loop and whatever you put inside the () will tell the loops how to loop...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
1 is another way of saying true, basically, while(1) is an infinite loop.
correct.platform is the variable and moveY is the operator for moving it upon the Y-Axis i suppose
Seconds, not milliseconds. you can use decimals for milliseconds, e.g 0.05wait(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
Yep, anything you open with curly brackets must be closed. same goes for, (, [, ", /* */,the next bracket closes the loop
the next bracket closes the function
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
-
- CJ Fan
- Posts: 173
- Joined: May 19th, 2006, 8:59 pm
- Location: Netherlands /// Limburg
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]
"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]
moving platforms
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?
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
.
http://codjumper.com/forums/viewtopic.php?p=67273#67273
Steve
Who is online
Users browsing this forum: No registered users and 2 guests