PDA

View Full Version : Hasselhoff, Drop the Whiskey Bottle and Check OUt


sgtsoso
09-20-2006, 09:40 PM
Script for mode toggle and speed control w/ hotkeys


Save the script to a .lua file (for example roy.lua) to the game sinatll folder (C:\Program Files\THQ\Company of Heroes\)
After enter the game, press Shift+Ctrl+` enter console, and type command

dofile("roy.lua")

and then you can use follow hotkey in the game:

F7 - toggle taskbar
F8 - toggle FPS graph
Ctrl+W - toggle wrieframe mode
Ctrl+B - toggle bigheadmode
Ctrl+Up - set to normal game speed
Ctrl+Down - slow mode
Ctrl+Left - slower
Ctrl+Right - after

The bad side is that CoH didn't support autoexec.lua, so you have to type the command in console each time you start the game.

Dose anyone knows how to tell CoH auto exectue this script when it start?

File: roy.lua
Quote:

g_nShowTaskbar = 1
function ToggleShowTaskbar()
if (g_nShowTaskbar == 1) then
g_nShowTaskbar = 0
taskbar_hide ()
message_hide ()
else
g_nShowTaskbar = 1
taskbar_show ()
message_show ()
end
end
g_nShowFPS = 0
function ToggleShowFPS()
if (g_nShowFPS == 0) then
g_nShowFPS = 1
statgraph_set_visible(1)
statgraph_channel_set_enabled("fps",1)
else
g_nShowFPS = 0
statgraph_channel_set_enabled("fps",0)
statgraph_set_visible(0)
end
end
function GameSpeed_Slower()
if (getsimrate() > 2) then
setsimrate(getsimrate() - 1)
end
end
function GameSpeed_Faster()
if (getsimrate() < 20) then
setsimrate(getsimrate() + 1)
end
end

bind("F7", "ToggleShowTaskbar()")
bind("F8", "ToggleShowFPS()")
bind("CONTROL+B", "ee_bigheadmode()")
bind("CONTROL+W", "VIS_Wireframe()")
bind("CONTROL+Left", "GameSpeed_Slower()")
bind("CONTROL+Right", "GameSpeed_Faster()")
bind("CONTROL+Up", "setsimrate(10)")
bind("CONTROL+Down", "setsimrate(2)")

*Rename roy.lua to autoexec.lua http://forums.relicnews.com/images/smiley/icon_smile_big.gif
it will autoload.

*Dont forget to add -dev to the end of ur shortcut ie C:\Program Files\THQ\Company of Heroes\RelicCOH.exe" -dev

Source: http://forums.relicnews.com/showthread.php?t=109045

Mr. Hasselhoff
09-20-2006, 09:45 PM
Nice. If you continue to be active here I'll make you a mod in the COH section, we need someone that also knows a lot about COH and can get other COH players in here.. Make a ring of them!


PS: I edited your post. Hope you don't mind you can change it back...

sgtsoso
09-21-2006, 09:03 AM
HI

I should point out that the information was taken from a link from the RELIC forum.

Credit goes to "Roy2008."