VScripts and Portal 2
Quote from Kasc on June 6, 2011, 12:30 pmTo what extent do scripts enable you to 'mod' or 'hack' the game. My plan is to have some more versatile timers in portal 2 (e.g. [spoiler]when you get tricked by GLADOS and enter the room she opens as you try to escape, a timer appears and countdowns your death as it were.[/spoiler] The entity used is a vgui_neurotoxin_countdown)
I would LIKE to have timer screens that you can pause and that will 'clock up' to the time that they countdown from.
Is this possible with scripts, if so, how would I go about this manual, brute force way of handling a timer?
Cheers.
To what extent do scripts enable you to 'mod' or 'hack' the game. My plan is to have some more versatile timers in portal 2 (e.g.
I would LIKE to have timer screens that you can pause and that will 'clock up' to the time that they countdown from.
Is this possible with scripts, if so, how would I go about this manual, brute force way of handling a timer?
Cheers.
Quote from Enraged on June 6, 2011, 1:20 pmVery simple way to understand VScripts. If you can do it in hammer you can do it in Vscipts. Vscripts are just the automation of processes within Hammer. I don't understand why people don't get this.
Very simple way to understand VScripts. If you can do it in hammer you can do it in Vscipts. Vscripts are just the automation of processes within Hammer. I don't understand why people don't get this.
Quote from Omnistache on July 28, 2012, 10:28 pmI feel like I should say that there are a LOT of things that can be done with vscripts that are impossible or incredibly difficult to do in hammer. Math, for instance, and dynamic counters, arrays of objects, other really complicated things...
They wouldn't have wasted the time integrating squirrel into the engine if it was just to "automate what you could do in hammer", they would have just added automation to what you can do in hammer.
Example,
I'm working on a portal 2 map that has physics objects you need to break.
The idea is to break them by dropping them from a high location, but you need to know if you are holding the object high enough for it to break (or take damage).I thought, hey, let's make lights that change color depending on how high you're holding it depending on how much health the object has left!
IMPOSSIBLE to do in hammer.
Possible with vscripts. (draw a traceline from the object straight down, check the distance to collision against the remaining health by approximating potential damage with square roots)
There are SOOO many awesome things you can do with vscripts (potentially)
unfortunately, they are basically undocumented, so the mappers are stuck figuring everything out with trial and error.
I feel like I should say that there are a LOT of things that can be done with vscripts that are impossible or incredibly difficult to do in hammer. Math, for instance, and dynamic counters, arrays of objects, other really complicated things...
They wouldn't have wasted the time integrating squirrel into the engine if it was just to "automate what you could do in hammer", they would have just added automation to what you can do in hammer.
Example,
I'm working on a portal 2 map that has physics objects you need to break.
The idea is to break them by dropping them from a high location, but you need to know if you are holding the object high enough for it to break (or take damage).
I thought, hey, let's make lights that change color depending on how high you're holding it depending on how much health the object has left!
IMPOSSIBLE to do in hammer.
Possible with vscripts. (draw a traceline from the object straight down, check the distance to collision against the remaining health by approximating potential damage with square roots)
There are SOOO many awesome things you can do with vscripts (potentially)
unfortunately, they are basically undocumented, so the mappers are stuck figuring everything out with trial and error.
Quote from FelixGriffin on July 29, 2012, 1:30 amI mean, look at the Sendificator. How would you do that in Hammer?
They let you do a lot of things, and that timer would certainly be possible. You'd need three overlays using those underground neon numbers, then use a script to count, split the number into digits, and fire an env_texturetoggle with the results.
I mean, look at the Sendificator. How would you do that in Hammer?
They let you do a lot of things, and that timer would certainly be possible. You'd need three overlays using those underground neon numbers, then use a script to count, split the number into digits, and fire an env_texturetoggle with the results.