Forum rules - please read before posting.

Active Inputs problems...

Can you please help me with these? : (2D game, Sprites Unity)

1. I want my player to only walk along X axis. I've disabled the up and down movement via an actionlist on start game in the AC settings tab. This however, works only for one scene, and once scene changes the player will again be able to fly off the screen. How do I make it persist across the whole game?

2. The up and down arrows should be used for examine/use. For now, I've set them to Interaction A & B. This works fine, however, as mentioned above, one scene later they will also make player move up or down, which we don't want ;) I could disable vertical axis altogether, but up and down should be used in dialogues and other menus for selecting options. The way I'm trying to do it, I press down arrow in the dialogue and it just selects the first option instead of scrolling it down... (and selecting should be done by pressing enter).

So I figured, this must be what active inputs editor is for.

I can set Vertical as Input #0, set it to available when Dialogue Options are visible, but then what actionlist asset do I attach to it? I'm lost. Do I have to write a custom script in order to make this work?


Comments

  • 1. Are you using a local Player object for that first scene?  The change is made per-player, so if you're using separate players, rather than letting one be spawned when your game begins, it's only going to affect the first player.

    2. Active Inputs are not used to control how existing inputs (e.g. Vertical, InteractionA, etc) behave - they're used to run ActionLists when new Input buttons are triggered under certain conditions (e.g. during normal gameplay, a Cutscene, etc).

    You've stated that you want up/down to be Interaction A/B, but also to be the Vertical axis, which sounds like why pressing down is selecting the first option.  You'll have to have separate buttons for A/B if you want to scroll with up/down - but you don't need to limit when Vertical has an effect: once the Player: Constrain issue is taken care of, it'll only be used for Menus anyway.
  • RemRem
    edited December 2016
    1. Indeed I am, in a lot of scenes in fact, I spawn my prefab in there somewere on the side, to check on the animations and such. So, if I understand you correctly, if I don't do that for the first scene, it will then stick for the rest of the game?

    EDIT: So far for most scenes I put player constrain in the on start cutscene anyway, so it's not that big of an issue ;)

    2. Ok, I've kinda reverted the changes for now, so it's back to Xbox controller (where X and A are use/examine) and different keyboard setup, where enter is InteractionA and shift InteractionB. But I keep thinking it would be way cooler if the up down arrows worked as InteractionA/B, except when in dialogue, it messes everything up. Is there some way I can disable Interaction A/B during dialogues/all menus and make up/down arrows just scroll options and confirm with enter? (with the current setup up and down arrows scroll options just fine).
  • 1. No - I meant each "local" Player is treated separately - so locking one won't affect the others.  You would have to put a "Player: Constrain" Action in each scene.

    2. If you switch to Unity UI-based Menus, buttons will be triggered by pressing the "Submit" button, not "InteractionA" - that's for AC Menus only.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.