Author |
Message |
robolee
Joined: Fri May 11, 2007 4:30 pm Posts: 1040 Location: England
|
Advanced script language?
Code: AddAtachable = Script Attrib Lookup Area = Scene If [0 Results] ScriptRestart Lookup{Actor(Portal2)}
If [MOCollision] {Actor(Portal)} MOPOS = Actor(Portal2)
ScriptCheck If [Status = 1] {Actor(Portal)(Portal2)} ScriptTerminate
Who: would like it/be against it/don't understand it at all/think its a waste of time... etc., also if you don't like the way I have coded it and your variations. I have a whole variety of code related to this post that I have thought about, but it is probably inevitable that it won't be added, or anything like it. If commands are bound by []'s then what it applies to is bound by{}'s
Lookup is special and also binds things with {}'s, why because it is retarded and I have no Idea how else to check for the other actor to be there
scriptcheck CHECKS if the actors are still alive or not, and it checks for both portals so you don't cripple the game.
Last edited by robolee on Wed Jan 09, 2008 12:20 am, edited 9 times in total.
|
Tue Jan 08, 2008 7:23 pm |
|
|
rebirth12345
Joined: Mon Dec 24, 2007 4:41 pm Posts: 125 Location: in a world called Earth
|
Re: Advanced script language?
link doesn't work.
|
Tue Jan 08, 2008 7:26 pm |
|
|
robolee
Joined: Fri May 11, 2007 4:30 pm Posts: 1040 Location: England
|
Re: Advanced script language?
ahh damnit, it worked for me on the threads page, it works now.
|
Tue Jan 08, 2008 7:33 pm |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
Re: Advanced script language?
When he does add a scripting language available to modders, I doubt it will be that syntax heavy.
Probably less punctuation, more tabbing. If, Then, Else, End, and maybe maybe individual actor's local variables. I bet it'll look a lot like BASIC.
|
Tue Jan 08, 2008 10:19 pm |
|
|
ProjektTHOR
Banned
Joined: Tue Feb 27, 2007 4:05 pm Posts: 2527
|
Re: Advanced script language?
Tabbing is a form of whitespace. Those are usually ignored by any language interpreters or compilers. Same applies to carriage returns and more than one space.
|
Tue Jan 08, 2008 10:33 pm |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
Re: Advanced script language?
Or.
You can use whitespace as a form of formatting, as seen in our very own variablepseudocode that is CC current coding. The tabs have the same function as brackets.
|
Tue Jan 08, 2008 10:40 pm |
|
|
ProjektTHOR
Banned
Joined: Tue Feb 27, 2007 4:05 pm Posts: 2527
|
Re: Advanced script language?
Missing the point Tim. Interpreters and compilers ignore formatting. They ignore it. If there is whitespace, they remove it. Its purely for humans.
|
Tue Jan 08, 2008 10:44 pm |
|
|
Ophanim
Joined: Wed Dec 26, 2007 6:33 am Posts: 1743 Location: Trapped in UCP. Send help.
|
Re: Advanced script language?
If compilers ignore it, wouldn't it be a simple thing to change the whitespace into a bracket?
|
Tue Jan 08, 2008 11:32 pm |
|
|
ProjektTHOR
Banned
Joined: Tue Feb 27, 2007 4:05 pm Posts: 2527
|
Re: Advanced script language?
When I mean compilers (or in CCs case, an interpreter) ignore whitespace, I mean this Code: AngularVel = 500 TriggerDelay = 50 This is the exact same as Code: AngularVel = 500
TriggerDelay = 50
|
Tue Jan 08, 2008 11:56 pm |
|
|
Ophanim
Joined: Wed Dec 26, 2007 6:33 am Posts: 1743 Location: Trapped in UCP. Send help.
|
Re: Advanced script language?
K. But that's rape rape rape enter key, not tabs. What'd be so difficult in making it not ignore tabs?
|
Tue Jan 08, 2008 11:59 pm |
|
|
robolee
Joined: Fri May 11, 2007 4:30 pm Posts: 1040 Location: England
|
Re: Advanced script language?
yes, they are "whitespace", but it makes it easy for humans to read, I have updated it to what I would consider better comparison; viewtopic.php?f=4&t=9586&start=15 (my second post read the code) removed ";" altogether, found it unnecessary and rather weird, no more "Than", it bulked the script and was completely unnecessary, compiled it a bit (yes to 4 lines, before adding this "whitespace" to make it nice to read and removing a lot of bindings), I didn't like the some word in the script, sounded like stupid things to be in a script... Basically it's better, and and I like it, and it wasn't done in less than 10 minutes whilst rushing out of the house (hint: the earlier ones were).
|
Wed Jan 09, 2008 12:11 am |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
Re: Advanced script language?
See, CC coding does interpret the tabs though. It only interprets tabs, not returns and spaces. That's why you get errors if you put in too many or too less tabs. Anyways, Data can code it any way he wants. If he wants whitespace to be counted, he can do that.
|
Wed Jan 09, 2008 2:12 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Advanced script language?
If he's going to implement scripting, it's very unlikely that he's going to create an entire language from scratch.
It's probably going to be based on LUA, Data was thinking of that earlier.
|
Wed Jan 09, 2008 3:46 am |
|
|
robolee
Joined: Fri May 11, 2007 4:30 pm Posts: 1040 Location: England
|
Re: Advanced script language?
Grif wrote: If he's going to implement scripting, it's very unlikely that he's going to create an entire language from scratch.
It's probably going to be based on LUA, Data was thinking of that earlier. The point of this wasn't to produce a bit of code that would be the exact same as this if put into the game, but to give a few examples of what could be included in the script (MO collision is probably already in the code just using different names and stuff. see: gibbing, when you hit a certain invisible line on the tutorial mission it triggers the AI to be enabled) This is an example of its use in the general .ini format for modders, also he HAS to create the entire script from scratch anyway, why not take few suggestions of what the fans of the game want. also if you are interested in coding but are incapable of doing so here is a guide to a little about C++ in game development (I myself have no experience with C++) http://www.gamecareerguide.com/features ... php?page=1
|
Wed Jan 09, 2008 5:11 pm |
|
|
Ophanim
Joined: Wed Dec 26, 2007 6:33 am Posts: 1743 Location: Trapped in UCP. Send help.
|
Re: Advanced script language?
Or use LUA.
|
Wed Jan 09, 2008 9:01 pm |
|
|
|