After the new controls,
Left Mouse = func ControlUse()
Right Mouse = func ControlThrow()
What is the func to key "Q"?
What is the func to key "E"?
What is the func to key "Space"?
What i want to do: In ekereload some weapons have more then one mode. I want change the mode on press "Q". Any ideas?
Left Mouse = func ControlUse()
Right Mouse = func ControlThrow()
What is the func to key "Q"?
What is the func to key "E"?
What is the func to key "Space"?
What i want to do: In ekereload some weapons have more then one mode. I want change the mode on press "Q". Any ideas?
Either define your own custom keys or overload the global PlayerControl function or the object's ObjectControl function to catch these controls.
In the clonk script:
You can look up these names in the global System.ocg/PlayerControls.txt file here. You can also have your own System.ocg/PlayerControls.txt in your scenario to define extra controls on any key.
In the clonk script:
public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool repeat, bool release, ...)
{
if(ctrl == CON_Interact && !release)
{
Message("Space was pressed.");
return true; // return true to overload normal key handling
}
if (ctrl == CON_Contents && !release)
{
Message("E was pressed.");
return true;
}
if (ctrl == CON_QuickSwitch && !release)
{
Message("Q was pressed.");
return true;
}
// Normal key handling (movement, etc.)
return inherited(plr, ctrl, x, y, strength, repeat, release, ...);
}
You can look up these names in the global System.ocg/PlayerControls.txt file here. You can also have your own System.ocg/PlayerControls.txt in your scenario to define extra controls on any key.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill