i would ask if there a way to put a console comand like "/timescale 0.5" into a value of a trigger, somethink like this "Press and hold F to change the timescale to 0.5"
i would ask if there a way to put a console comand like "/timescale 0.5" into a value of a trigger, somethink like this "Press and hold F to change the timescale to 0.5"
Use the trigger like normal then once the trigger is activated use this:
Code Snippet
Plaintext
ModVar( "timescale", 0.5 );
Haven't actually used this but it seems its something people use for their anti-cheat to disable cheats like god by setting them to 0.
You won't be able to do anything special inside radiant. The way all triggers work is they are included inside scripts.
Here is an example:
Code Snippet
Plaintext
function init() // Initialization variable, call this in your mapname.gsc to start the script. { // Do whatever you would need to do here, not required for this. thread GetTrigger(); // Calls the function while threading it so multiple functions can be executed at the same time. }
function GetTrigger() // Function where all code for what you are currently doing is called. { trigger = GetEnt("triggertargetname", "targetname") // Replace "triggertargetname" with whatever you put in the targetname kvp in radiant.
// You would want a while loop here if you want the trigger to be able to be activated more than once.
trigger waittill("trigger", player); // Waits for the trigger to be activated, player isn't needed but is useful. ModVar("timescale", 0.5); // Sets the timescale to 0.5 }
Last Edit: November 16, 2016, 08:06:49 pm by reckfullies
You won't be able to do anything special inside radiant. The way all triggers work is they are included inside scripts.
Here is an example:
Code Snippet
Plaintext
function init() // Initialization variable, call this in your mapname.gsc to start the script. { // Do whatever you would need to do here, not required for this. thread GetTrigger(); // Calls the function while threading it so multiple functions can be executed at the same time. }
function GetTrigger() // Function where all code for what you are currently doing is called. { trigger = GetEnt("triggertargetname", "targetname") // Replace "triggertargetname" with whatever you put in the targetname kvp in radiant.
// You would want a while loop here if you want the trigger to be able to be activated more than once.
trigger waittill("trigger", player); // Waits for the trigger to be activated, player isn't needed but is useful. ModVar("timescale", 0.5); // Sets the timescale to 0.5 }