Hello Lone Wolf, I hope I'm not necro-posting by making this comment, but it should be fine since you were active today, although it has been 2 years since the last comment was made on here... I mean, I think it's ok... right?
Anyways, I was wondering if it's possible to make a method for a conditional branch that detects if player two's controller is plugged in or not. What I'm trying to do is make a menu option that, when selected, runs a common event that detects if a second controller is connected or not. If it is, it activates a switch. If one isn't, a message appears saying that player 2 isn't connected. I've got the menu down and everything, but now I need that conditional branch... Is it possible?
P.S. This script is extremely helpful and impressive. Thanks for putting hard work into it and improving it over-time!
Amazingly enough, I am in fact still alive and working (privately) on my own projects.
It's not otherwise documented, but WolfPad.plugged_in? is actually overloaded to take an ID as a parameter. Using the script option on a conditional branch to check WolfPad.plugged_in?(1) should accomplish what you want (1 meaning pad 2 because integer IDs are stupid like that).
It won't work for emulators or input remappers that fake detection on disconnected pads, though, but then again nothing can (or should even be able to) detect that.
Thanks, it works perfectly! Is it also possible for controller 2 to be able to take control of player 1's functions? Like say at one point player 1 is doing all the map movement, battle control, menu selections, and so on. But then (via a script call or something), controller 2 takes over the functions that player 1 was doing
You would have to code some kind of conditional yourself, but the sky's the limit, really. Adding some kind of "active player" variable to the core input checks should suffice. (Remember to call WolfPad instead of Input when checking inputs by pad ID.)
I think I might have an alternate idea. What would be called to force player 1 to make an input (like A or Y)? Maybe I can make conditional branches where, when controller 2 presses the A button for example, a script call happens that forces input A to be activated (assuming it would come from controller 1 by default). That way, player 2 can basically do whatever player 1 can do
It's possible to convert this script to XP?
I tested on XP and it doesn't give any errors (though, the only thing that works are the analog sticks to move the player), only if i use the input.pressed with the script's inputs.
Or, maybe it works on it too but my controller is old? I have no idea if my controller is old, though as i said, only the analog sticks work.
Hello, sorry for necroposting, I don't know if it is allowed but maybe I will finish my game (for about 10 yr of work with a lot of break from creating it 😉)
I have problem with pad F310 Logitech when Im using this script, the buttons are mapped ok but only the Cancel button is working. Any guess why? I'm using Khas Sapphire battle system.
The usual answer would be that some other script is checking buttons differently. The second answer is something is interfering with mappings at the driver level (as Logitech does sometimes). Try testing just the pad plugin in a new project, it should feel like nothing is installed at all. There's also a link a few posts (and years!) back to an adapter someone wrote for that battle system you may want to try if you haven't.