Bind and distinguish 2 equals joysticks new input system Unity3d - unity3d

I am making a Pad Dance Game. I have 2 pad dances, they works like a joystick on Pc, they almost have the same number/button sequence(because they are not from the same company). The problem is when I click one pad and the other has the same gamepad number the action works in both player. I need the input system to distinguish if I am pressing the same number button from joystisck one or two. The image below shows how the input system detect the binding for the up arrow icon on the pad 1("botao1") and 2("botao11"), there is no difference if I am pressing joystick one or two. I tried to create 2 differents Action Map, didn't work, because the biding system don't recognize if am pressing joystick one or two. Any clues? Tks in advance

You need to duplicate the inputs, one for each pad (so for example "Left_Player1" and "Left_Player2"). You configure both inputs identically, except that they must have different JoyNum values.

Related

Autohoykey - Hold down multiple keys for different time intervals

I want to create an AHK for pressing down multiple different keys, but pressing and releasing them at different times, all in the same AHK. For example, hold down forward to walk in a game, then hold left/right while still walking forward to turn. I am very new to this so any help is appreciated.
I have tried creating different scripts, both using the same key to active, but only 1 activates at a time.

How to get input intensity of gamepad using old input manager?

I’m looking for a way to get the input intensity of a controller joystick when using a Xbox/PS5 Controller in Unity using the old Input Manager. Anything would help, I can’t find any resources on this subject, thanks!
Currently, the only results I’m getting are -1,0,1 using the old input manager
I think you already have your desired output. The method Input.GetAxis() returns a value between -1 and 1, representing the intensity of the joystick input. A value of -1 indicates that the joystick is fully pressed to the left, a value of 0 indicates that the joystick is not being pressed, and a value of 1 indicates that the joystick is fully pressed to the right.
To get the input intensity of a specific joystick, such as the left joystick on an Xbox controller, you can use the following code:
float leftJoystickIntensity = Input.GetAxis("LeftJoystickX");

Is it possible to change the buttons in inputManager of Unity3D's gamesettings?

I am developing a 2D platform game, and is going to realize a function, let's use F to represent it, which could reverse player's control. For example, if I originally press A to make the character go left. After I use F, I press A to make the character go right.
The problem is that in my game,there will be two players using one keyboard to control 2 different characters. Both the characters use
float moveX = Input.GetAxis("HorizontalP" + player_number);
player_position = this.transform.position;
this.transform.position = player_position;
which use buttons set in inputManager.
I can't use lots of if else to get the reverse control function. So I tried to seek for some ways to change the input button mapping by script while playing the game. However, I couldn't see any such answers to handle that. Is there any solution for that?

SpriteKit & Swift: How to create level "segments" that are randomly "stitched" together to create an endless game?

The concept that I am talking about is similar to the style of game seen in many minimalistic, popular mobile games such as Color Switch, the Line Zen, Phases, or Bounce. These are endless games composed of a series of "levels" or "rooms" that are placed in a random order, and are one after another, creating the effect of an endless game. The key thing is that the challenges in each level are not random, they are drawn up before, and if that certain level is chosen randomly, it appears on the screen and the player moves through that level.
I think this concept might be called procedural generation, though I'm not positive.
How would I do this in SpriteKit using Swift? I'm not really sure where to start, maybe create a function for each level segment and, every few seconds, choose a random one to put on the screen?
Any help is appreciated!
Thanks so much!
Procedural generation is the name of the concept you are describing.
The approach will change a bit depending on the type of game you are trying to make but let's look at procedural generation in an infinite runner game. What you want to do is set up a buffer of level segments. The total size of the segments in your buffer should be at least twice the size of the screen. Every segment should be a child of the same segments node and they should be positioned so that each starts right after the previous one ends.
When a segment moves off screen (the player passed it):
remove that segment from the segments node
initialize a new segment (probably from a sks file)
add the new segment to the segments node
position it behind the last segment in the segments node.
The logic you use for choosing the next "random segment" is up to you. It can be truly random or you can fine tune it for the best user experience (avoid repeating segments, avoid segments that would ruin the flow, etc).
The key is to remove segments as they go offscreen and add a new one at the end of the buffer. This must be position based, not time based (time is less reliable even when the game scrolls at a constant speed).

Changing the value of a joystick's Y axis

I'm currently trying to change the value of my joystick's (T.16000M) Y axis using AutoHotKey.
A little background first: I'm configuring some voice commands for Star Citizen, and I'm trying to write a script that would activate decoupled mode (so that I have 6 degrees of freedom), after which I would potentially adjust my ship's pitch by a full 180 degrees along the Y axis. I've discovered that I can't exactly do this using VoiceAttack alone, because within the game, only raw mouse input is accepted, and I cannot figure out how to simulate raw mouse input with either VoiceAttack or AutoHotKey.
Therefore, my next best solution would be to change the value of my joystick's Y axis, if this is at all possible in AutoHotKey. I've done tons of googling, and I've searched the entire documentation for any clue on how to achieve my goal.
I understand that JoyX, JoyY, JoyZ, etc., can be used to map joystick input to some other sort of control, like in this script that maps joystick input to the mouse cursor.
I hope this post is appropriate for StackOverflow; I wasn't exactly sure where else to put it. Maybe superuser?
Anyway, thanks for your help.
By the way, here is the code I was planning to use for the mouse:
MouseMove, 0, 500, 10, R
MouseMove, 0, -500, 10, R
This works in Windows, but not in the game, because the game only accepts raw mouse input.
To simulate raw mouse movement with AutoHotkey, use DllCall("mouse_event"... (Google it, there are tons of examples).
To get VoiceAttack-like functionality in AHK, see HotVoice
It is absolutely impossible to alter a joystick in AHK like you can alter keyboard. You need to create an extra virtual joystick and send output to that. See CvJoyInterface.