This member has provided no bio about themself...

Comment History
razfarg
razfarg - - 9 comments @ Toggle Helmet Hotkey

The keyBind setting will use whichever key is bound to the specified action in the in-game keyboard configuration menu.
The dikKey setting can be used to specify a key directly, without needing to be bound to an action in-game.

If you need help, let me know which key you'd like to use, and I can give an example setup.

Good karma+2 votes
razfarg
razfarg - - 9 comments @ Toggle Helmet Hotkey

It will only put on the last helmet that was taken off using the hotkey.

Good karma+5 votes
razfarg
razfarg - - 9 comments @ Toggle Helmet Hotkey

It will do the animation if you have them enabled.

Good karma+3 votes
razfarg
razfarg - - 9 comments @ Press and Hold reload to lower weapon

Love seeing the idea expanded on.

Good karma+1 vote
razfarg
razfarg - - 9 comments @ Quick Holster Script for Anomaly 1.5.1

Here's a stripped down example with all the holstering logic removed and a 1.0 second delay:

function on_game_start()
RegisterScriptCallback('on_key_press',on_key_press)
RegisterScriptCallback('on_key_release',on_key_release)
end

function delayedFunction(parameters)
--Do stuff here
end

function on_key_press(key)
local bind = dik_to_bind(key)
if bind == key_bindings.kCUSTOM24 then
CreateTimeEvent("UniqueEventID","UniqueActionID",1.0,delayedFunction,"optionalParameters")
end
end

function on_key_release(key)
local bind = dik_to_bind(key)
if bind == key_bindings.kCUSTOM24 then
RemoveTimeEvent("UniqueEventID","UniqueActionID")
end
end

Good karma+1 vote
razfarg
razfarg - - 9 comments @ Quick Holster Script for Anomaly 1.5.1

Apologies for the lack of comments in the file.

Check out axr_main.script, _g.script, and lua_help.script for info on the callbacks, time events, and key_bindings respectively.

lua_help.script also has a list of available game functions

For the last bit:
--If the pressed key's bound ID is between 22 and 27(bindings for weapon slots 1-6)
elseif bind<28 and bind>21 and gameActive() then
--Subtract 21 to translate keybind ID into equip slot number(1-6)
prevSlot = bind-21
end

Good karma+1 vote
razfarg
razfarg - - 9 comments @ Quick Holster Script for Anomaly 1.5.1

It came from more of a want than a need to be fair. It can cut down on the finger gymnastics if you want to holster or un-holster a weapon, especially if you're using the movement keys at the same time.

Good karma+1 vote
razfarg
razfarg - - 9 comments @ Quick Holster Script for Anomaly 1.5.1

Guilty as charged.

Good karma+2 votes
razfarg
razfarg - - 9 comments @ Quick Holster Script for Anomaly 1.5.1

That should be possible. The general idea was to use CreateTimeEvent on key down to call the relevant function after a delay, and cancel the event if the key is released early.

Good karma+1 vote