Controlling actions directly with a controller input

Hello, been trying some things out in BGE and was wondering if I could get some advice or help in creating a python setup to control an action using a control pad analogue input directly. this is for a lockpicking system I am working on.

I understand Its very possible using the property type action, and this is fine, however being new to bge , im having difficulty changing the property to the same value as the analogue stick.

so to clarify, I’m looking to have the action on the object mimic the value of the control sticks input.
so , when the control stick is untouched, the action is on frame 1 or zero , when the stick is moved all the way over, the action is on the end frame (say, frame 100 although the actual frame shouldnt matter too much.)

a small piece of python as an example would be most appreciated, as I could probably change and modify it to suit my needs

even more useful would be the ability to have 2 objects do the same thing using the same property (if its even possible.)
Its probably very easy and its something I should be able to learn on my own , but I have zero knowledge with python and the bge api , and wouldnt know where to start :spin:

just use python to make a property from the joystick input, and have the property read zero if close enough to the deadzone,

scale the property and save it

own[‘axis1X’]=property

and then

if axis1X changed—and-----play action property mode axis1X

I’m going to sound like an idiot here, but how would I actually do that…

I understand what you’re saying, and it fits in perfectly with the original question, I even understand your pseudo code somewhat, I just have no idea how to make that happen in blender…

please try to explain it like you would a small child. :smiley:

joystick sensor-----python

https://www.blender.org/api/blender_python_api_2_65_9/bge.types.html#bge.types.SCA_JoystickSensor

axisValues

you can use the list, to find your axis, and then use the float your lookingfor

like

joysticksensor.axisValues[0] is the first axis on the list