Coding
Quote from TheDarkness73 on June 6, 2011, 9:00 amIs there any specific program in the editor for coding, because I don't see any. So that leaves the question, how do we code it and import it? Is there any place where they have tutorials for coding, or coding in portla 2?
Is there any specific program in the editor for coding, because I don't see any. So that leaves the question, how do we code it and import it? Is there any place where they have tutorials for coding, or coding in portla 2?
Quote from ChickenMobile on June 6, 2011, 9:05 amCoding would be the same for any source game, and it would be called 'scripting' rather than coding. The most native scripts come in a .cfg file which is just a text file with its' extension renamed.
You can find a TF2 example here: http://www.tf2wiki.net/wiki/Scripting
Portal 2 comes with scripts with a .nut extension rather than .cfg extension as they can execute more complex scripting, with the added feature of functions (similar to any type of coding).
Coding would be the same for any source game, and it would be called 'scripting' rather than coding. The most native scripts come in a .cfg file which is just a text file with its' extension renamed.
You can find a TF2 example here: http://www.tf2wiki.net/wiki/Scripting
Portal 2 comes with scripts with a .nut extension rather than .cfg extension as they can execute more complex scripting, with the added feature of functions (similar to any type of coding).
Quote from TheDarkness73 on June 6, 2011, 9:16 amOkay, thanks. So I can open the files with like notepad or along those lines?
Okay, thanks. So I can open the files with like notepad or along those lines?
Quote from TheDarkness73 on June 6, 2011, 9:17 amAnd, how would I import it. Like, I wanna make a gel, but I have to script it, and then make a model for it. How would I put all of this into Portal 2?
And, how would I import it. Like, I wanna make a gel, but I have to script it, and then make a model for it. How would I put all of this into Portal 2?
Quote from ChickenMobile on June 6, 2011, 9:33 amYou can look at the scripts Valve has made by looking in the appropriate folders: common/portal 2/portal2/scripts/vscripts. This might give you a better example on how to make it yourself.
And by reading another thread, gels just use a texture on a particle. You might want to have a look at it: mapping-help/changing-gel-colours-t3208.html
You can look at the scripts Valve has made by looking in the appropriate folders: common/portal 2/portal2/scripts/vscripts. This might give you a better example on how to make it yourself.
And by reading another thread, gels just use a texture on a particle. You might want to have a look at it: mapping-help/changing-gel-colours-t3208.html
Quote from TheDarkness73 on June 6, 2011, 9:41 amOkay thanks. After I posted, I thought about just changing the gel color. So, how would I include the script in though? Just put it in a folder? I'm gonna check the valve scripts just to see if it's individual for each script or not, not sure yet though
Okay thanks. After I posted, I thought about just changing the gel color. So, how would I include the script in though? Just put it in a folder? I'm gonna check the valve scripts just to see if it's individual for each script or not, not sure yet though
Quote from TheDarkness73 on June 6, 2011, 9:45 amNotepad does work with nut files, alright, part of the way there
Now need to figure out the rest of how to make the gel. Is there any scripting or anything for allowing gel or portals to bounce, kinda like in pool, where the bounce off at the same angle and what not?
Notepad does work with nut files, alright, part of the way there
Now need to figure out the rest of how to make the gel. Is there any scripting or anything for allowing gel or portals to bounce, kinda like in pool, where the bounce off at the same angle and what not?
Quote from ChickenMobile on June 6, 2011, 9:50 amTheDarkness73 wrote:Is there any scripting or anything for allowing gel or portals to bounce, kinda like in pool, where the bounce off at the same angle and what not?I personally haven't messed around with this. There probably is a script somewhere inside the script folders that manages the different gels.
I personally haven't messed around with this. There probably is a script somewhere inside the script folders that manages the different gels.
Quote from TheDarkness73 on June 6, 2011, 10:21 amOkay, thanks alot for the help.
Okay, thanks alot for the help.
