Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: jeanfabre on October 24, 2013, 03:39:24 AM
-
Hi,
Following a request, Please find a custom action to iterate through each joysticks currently plugged.
Warning. On Mac I know joyscticks are truly plug and play and the list automatically adjust as you plug and remove joyscticks, but on Windows I can recall it's not that well integrated, and you may have to plug your joysctick before starting the game ( at least I can recall some odd behaviors).
You'll find also attached the test scene to go with that action.
bye,
Jean
-
Thanks Jean!
To my understanding Unity will change the Joystick list as Gamepads are added and removed. I'll let you know if I run into any problems
-
Sorry to bring this up again but I'm having a hell of a time trying to get this action to do what I want :-[
I'm simply trying to assign a string variable from a requested Joystick Name (does not even need to detect if it's connected) and the loop structure here is kinda confusing me. The example you provided does not do this, but instead combines each JoystickName to a single string, and not separate variables.
I tried to set up an fsm that would manually count loops and assign the string variable, but the internal loop in the action seems to be causing problems.
-
Hi,
I am not sure what you are trying to do, can you explain your goal?
bye,
Jean
-
I want to be able to save Joystick names for each device as separate string variables.
Something like:
Joystick: INT
Store As: String
So if I request Joystick 0 it would return the device name "Xbox Controller" as the string and store it.
-
Hi,
Ok, I see. Try the action attached to this post.
Bye,
Jean
-
Wow Jean this is great, thank you so much!