Function to recognize Trigger Direction
1 post
• Page 1 of 1
Function to recognize Trigger Direction
I'm hoping one of the scripting gurus here has already written the function I have in mind; its purpose is to differentiate which direction the trigger (L2/R2) is traveling and as such activate different things, ie. if the trigger was being pulled would be state A vs if the trigger was being released, state B. I have a small idea how it would be written, store the value of the trigger IO and compare the next value with the stored, if its more then state is A (being pressed) and if its less, state is B (being released). Has anyone experimented with such a function and already has some code written? Also any suggestions or potential minefields I have missed in running such a function would be much appreciated.
EDIT: Looks like J2Kbr already made a function for this "get_prev" https://www.consoletuner.com/wiki/index ... 2:get_prev
EDIT: Looks like J2Kbr already made a function for this "get_prev" https://www.consoletuner.com/wiki/index ... 2:get_prev
- creedkiller
- Lieutenant
- Posts: 293
- Joined: Fri Mar 17, 2017 4:08 pm
1 post
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: alanmcgregor and 130 guests