Game Development Community

Config.cs

by James Hill · in Torque Game Engine · 10/05/2004 (9:41 am) · 2 replies

Everytime I run the exe the config.cs in the client folder gets overwritten and all the weapon switching code disappears. Any suggestions on what to do with that or what is wrong? Thx

#1
10/05/2004 (9:56 am)
Config.cs is exported by the engine everytime it closes to store keybindings. When the engine loads, it executes default.bind.cs first (contains the default keybindings and usually the corresponding functions) then it calls config.cs to overwrite the default keybindings. Basically, you can't put any of your code in config.cs because it will be overwritten everytime the engine closes. If you don't care about saving keybinding changes, the code that exports the config.cs file is in the onExit function in starter.fps/main.cs (not positive about this). I would reccomend just moving your code from config.cs to scripts/default.bind.cs.
#2
10/06/2004 (1:29 pm)
Thx for the response :)