Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Joysticker Pro

A Joystick to Keyboard Mapping utility using Lua scripts · By Pixelbyte Studios

Timed callback?

A topic by ArpegiusWhooves created Sep 24, 2018 Views: 39 Replies: 1
Viewing posts 1 to 2

I want to do something like this:

local deltaAD = 0.0
local deltaWS = 0.0
local deltaQE = 0.0
function timer_callback()
     deltaAD += JS.Stick[0].value -- values from -1 to 1
     if deltaAD < -0.5 then
        JS.SendKey(KEY.A, true)
        deltaAD += 1.0
        JS.SendKey(KEY.A, false)
    if deltaAD > 0.5 then
        JS.SendKey(KEY.D, true)
        deltaAD -= 1.0
        JS.SendKey(KEY.D, false)
    -- here more for each WS QE buttons
JS.RegisterTimer( timer_callback, 1000.0 / 60.0 ) -- call it 60 times per second. 

Unfortunatly none of many Joy to Keyboard Mappers cannot be configured to do so simple and obvious task.   
Is this a thing you might consider implementing in your application?


I do plan on adding some sort of Time based key sending  functions, but I'm not sure when that will happen.