Difference between revisions of "Lua:speedhack setSpeed"

From Cheat Engine
Jump to navigation Jump to search
(For quite some games speedhack_setSpeed(1) and getMainForm().cbSpeedhack.Checked=false are different results. The latter works for all games in my experience.)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:speedhack_setSpeed}}
+
[[Category:Lua]]
 
 
 
'''function''' speedhack_setSpeed(''speed'')
 
'''function''' speedhack_setSpeed(''speed'')
  
Enabled the speedhack if it wasn't active yet and sets the required speed.
+
Enabled the [[Cheat_Engine:Speedhack|speedhack]] if it wasn't active yet and sets the required speed.
  
 
Example:
 
Example:
   speedhack_setSpeed(5)   --5 times the normal speed
+
   speedhack_setSpeed(5)                   --5 times the normal speed
   speedhack_setSpeed(0.5) --Half the normal speed
+
   speedhack_setSpeed(0.5)                 --Half the normal speed
   speedhack_setSpeed(1)   --Normal speed
+
   speedhack_setSpeed(1)                   --Normal speed
 
+
  getMainForm().cbSpeedhack.Checked=false  --disables speedhack and unchecks the "Enable Speedhack"
  
 
===Function Parameters===
 
===Function Parameters===
Line 23: Line 22:
  
  
== See also ==
+
{{LuaSeeAlso}}
* [[Lua]]
+
 
 +
{{DISPLAYTITLE:speedhack_setSpeed}}

Latest revision as of 13:35, 30 December 2023

function speedhack_setSpeed(speed)

Enabled the speedhack if it wasn't active yet and sets the required speed.

Example:

 speedhack_setSpeed(5)                    --5 times the normal speed
 speedhack_setSpeed(0.5)                  --Half the normal speed
 speedhack_setSpeed(1)                    --Normal speed
 getMainForm().cbSpeedhack.Checked=false  --disables speedhack and unchecks the "Enable Speedhack"

Function Parameters[edit]

Parameter Type Description
speed float The speed to set


See also[edit]