I am trying to get ORK3 to support local multiplayer (not Online MultiPlayer) with [New Input System].

The NewInputSystem can easily absorb almost any input, not only PS4/Xbox, but Switch, Touch, Steam controllers, etc.
This makes multi-platform support very easy.
Depending on the number of controllers, this is a real-time battle controlled by one to four players.
How can I make the ControlMap of a member in the second PlayerGroup work while the first player remains IsPlayerControlled?
http://makinom.com/guide/documentation/features/input-keys/#13-toc-titleI would like to use this guide to achieve local multiplayer using InputID.
However, after quite a bit of trying, I converted the playerIndex (0-3) in [New Input System] in Custom Script to InputID (0-3) and told ORK to enter the InputKey for each player, but the second Player's ControlMap does not work.
http://makinom.com/guide/extensions/scripts/unity-input-action-input-key/I tried this Makinom plugin and it worked fine for solo, but it did not recognize the InputID and considered the two controllers as the same input.
So, I used CustomScript to indicate the InputKey.
In [New Input System], when you press a button on the second controller in the PlayerInputManager Component, a JoinAction is performed.
So PlayerInputManager instantiates Prefab and assigns PlayerInput's playerIndex.
I want to use this because from a usability standpoint, it would be easier for a second friend to Join. (For example, a friend can instantly Join by simply pressing and holding the button on the second controller for 3 seconds.)
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Components.htmlSo, set the combatant's Prefab to InstantiatePrefab in PlayerInputManager.
AutoMachineComponent is pre-attached to the Prefab.
Set StartType to Start=0 and run Player Join Group Node and Add Combatant Node from Machine at the same time as Instantiate.
From a custom script
var pickInput = Maki.InputKeys.Get(attackID);
pickInput.SetAxis(playerIndex,1f);
yield return null;
pickInput.SetAxis(playerIndex,0f);
Do I need anything else, I tried ShortCutAbility instead of Ability with the same result.
To begin with, the player2 combatant’s control map does not work.
How can I use Makinom2 + ORK3 with separate Input IDs to trigger Ability on each Combatant in the same ControlMap?
I've plans to add more support for that (e.g. being able to assign input IDs to combatants), but it'll probably not be in the next update (my Covid infection somewhat derailed my schedule :D).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I really hate Covid. I'm sorry you had a hard time. ・・・・ Please take care of your body first and foremost.
I also read the source code of ORK and Makinom and added ORK.Game and Maki.Game to the Debug watch and gradually I understand what is going on.
For now, the current version of ORK does not use the control map, and development is progressing with the following custom input scripts for each player.
I'm very excited to hear that it will be officially supported in a later version!
Local multiplayer is a must for my game, so I will force it to be supported by CustomInputScript, which will be very useful when we support online players in our ORK games in the future.
There is also UnityGamingService, and UnrealEngine's OnlineService is also available in Unity (at no server cost!). You can use it.
async private void NewInputSystemPickActionFire()
{
if (interact.AvailableCount > 0 )
{
Debug.Log("interact");
Maki.Game.Player.SetPlayer(gameObject,false,false,false,false);
interact.Interact();
return;
}
if (!shortcuts[0].CanUse(combatant, false, false)) {
Debug.Log("Cant use");
return;
}
List<Combatant> targetList = new List<Combatant>() { combatant };
Combatant target = combatant.SelectedTargets.GetAbilityTarget(combatant,shortcuts[0] as AbilityShortcut);
if (target != null)
{
targetList.Clear();
targetList.Add(target);
}
shortcuts[0].Use(combatant,targetList,true);
Debug.Log("Fired!! inputID=" + inputID + " isPlayerCont:" + combatant.IsPlayerControlled() +
" Comb Name:" + combatant.GetName()+" shortCut:"+shortcuts[0].GetName()+" taget:"+targetList.FirstOrDefault().GetName());
}
What we would like to see happen is the following
1: Allow Override InputID to be used in each Combatant instance of ControlMap like Makinom's InputID.
2: Interactions should also support InputID.
3: There was a problem when the Combatant prefab was instantiated from the UnityInputSystem instead of from the CombatantSpawnNode.
When I made my GameObject the Combatant of Player2 in AddCombatantNode, the Combatant Init Schematics is no longer called.
So, I set up Init Schematics in AutoMachine instead. This seems to be a bug in AddCombatant.
That is all.
■iOS
https://itunes.apple.com/us/app/id679133055
■Android
https://play.google.com/store/apps/details?id=com.WabiPlant.SAMURAI100SlashLite
New ORK Battle Game
■iOS
https://itunes.apple.com/jp/app/id1403510381
■Android
https://play.google.com/store/apps/details?id=com.Company.AgentFight
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
(and not necessarily for New Input System)
I managed to spawn two player combatants in my game (using Game Kit Controller and some ORK nodes), but only the current "Makinom/ORK Player" is able to do interactions in my scene (e.g.: Talking with an NPC).
The second player can't interact with the NPC, the interaction HUD window doesn't appear when that second player character is near the NPC. The first player can interact normally with the NPC.
However, the rest is still single-player and there's only one combatant controlled by player controls, etc.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Would it be too much work to allow more than one Makinom Player/ORK Player in the systems? To achieve true multiplayer support.
I don't know how much of the internal Makinom/ORK systems would need to be refactored around that.
Via a Control Component node in a schematic (e.g. the same with the Change Combatant Input ID node to set the combatant's input ID) you can register player or camera control components with the system to be blocked on control blocks.
The control components already need to be on your players (e.g. the prefabs), though.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
But my issue is not so much with the players' input (which from what I understood, I guess can be worked around by using the Control Component and Change Combatant Input ID nodes).
My multiplayer issue is more about (for example) the interaction HUD not appearing/interaction event not working for the second player I've spawned (the issue I mentioned in some posts above).
And if InteractionController is being affected by this issue, then other systems may possibly be affected too. (I haven't tested Makinom/ORK enough to confirm that)
Also, in my game's case, the two players are being controlled simultaneously (split-screen, action RPG).
Their movement/camera controllers are actually using Game Kit Controller, but I was trying to also trigger interactions using Makinom's InteractionController.
I'm not sure if the Change Combatant Input ID and Control Component nodes will help with the stuff I've mentioned. But if those nodes can actually help solve this, then great! :D
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Will look into having interactions from multiple players.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
https://cdn.discordapp.com/attachments/1009249032008380416/1083531320573050911/image.png
E.g. input key Accept has 2 input IDs added:
- input ID 0 > uses joystick 0 button 1
- input ID 1 > uses joystick 1 button 1
Using the Change Combatant Input ID node in a schematic and setting the 2nd player group member's input ID to 1 will now have that combatant's menu inputs use joystick 1 instead of joystick 0 for the accept key.
Do the same for the rest of the input keys to have full control, e.g. horizontal/vertical menu input, cancel, control map keys, etc.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!