Hello,
[ AC v1.81.6 / Unity 2021.3.4f1 ]
I've been learning some basic stuff with Adventure Creator, but have zero coding knowledge. I'm doing a test of a 2D combat scene (something like Punch Out: a fixed arena, but with no character movement, and inputs for attacking and blocking). This is my first time trying to implement custom key inputs so I think I'm just not quite grasping the basics. I want to press "space" to block, and if you keep holding "space" the player will continue to block.
I already have 2 animations made: 1 for the player moving to block, and 2 the continued blocking pose. In the Project Settings -> Input Manager, I renamed "Fire 2" to "block" and changed the Positive Button to "space", then in the AC "Active Inputs" Editor I created a new input for that, and the ActionList plugged into that input should play the animation.
And I don't think it's an issue with the ActionList or Animator because I can get it working with a clickable hotspot, I just want it to be the space bar input instead (but I could be wrong)
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Here's some screenshots. Sorry not sure if there was a better way to link these.
I might have actually figured it out with some more messing around. But let me know if this method is flawed or will cause issues.
I think the main reason was that the new "Active Input" is in my project folder and couldn't communicate with the player game object in my scene. So instead I changed that "block" Active Input ActionList to simply "run action list in scene" and then my custom animation action list just lives in the scene. Seamed to work fine and the two functions seem to communicate, but yeah let me know if I'm messing stuff up.
Having your Active Input ultimately trigger a scene-based ActionList should work just fine.
The original issue you're likely facing with assets, is that the Actions don't reference scene objects. Rather than assigning prefabs, either assign scene objects in the asset Actions - allowing AC to record its Constant ID - or check Is Player? in Actions that affect the Player.