Forum rules - please read before posting.

An opened inventory menu makes player ignore triggers altogether

In my PNC adventure game, there are rooms/scenes where I've set triggers to affect gameplay in various ways: in a few rooms, a trigger changes player's animations from walking to swimming with "Char>Animate: Set Standard" as the character moves from ground to water. In one room, all player movement is stopped with a trigger once the character walks over a certain spot for the first time. And there are many others.

In the game, I have an inventory that looks like the one from LucasArts' The Dig -- a transparent grid that appears on top of the scene with a mouse-right click, covering maybe 70% of the screen, the middle part.

I just noticed that if the player's on one side of the room, I click on the other side of the room in order to make the character walk there and THEN open the inventory before he walks past a trigger, AC seems to completely ignore that trigger (as well as all the other triggers in the player character's way). Surely it doesn't make any sense that these things affect each other? Why is it so and can something be done to prevent this from happening?

A friend suggested me to simply remove the possibility to access the inventory while the player is walking. I really don't want to do that as it's very important to me that the playing experience is as fluid and user-friendly as possible. So I don't want to add any restrictions like that. There must be another way to solve this, right?

Comments

  • We'll need to do some digging to learn exactly what's going on - it may be that the Trigger's running, but certain Actions aren't taking effect.

    The easiest way to determine if it's being run is to insert an ActionList: Comment Action in there (preferably a pair - one at the start, one at the end). When such Actions are run, their set text will display in the Console - check to see if they appear.

    As well as that, I'll need some more details to know the exact situation. Can you share screenshots of the Trigger's Inspector, the Inventory menu's properties, your Player's Inspector, and your Settings Manager? Let me know your AC and Unity versions as well.

    It'll also help to know the game-state at this time. Enable the "AC Status box" at the bottom of the Settings Manager, which displays in the Game window at runtime. What does it show at the time the issue occurs?

  • When the inventory is enabled/onscreen, all triggers are completely ignored = not run at all.

    As the issue happens, the AC Status box shows what it normally shows:
    "Current game state: Normal" etc.

    If the inventory is NOT opened when the player walks past the triggers, they work as they should, and the box shows (walking past RatTrigger in this example):
    "Current game state: Cutscene, ActionLists running: RatTrigger, Gameplay is blocked."

    The Unity version is 2019.4.17f1 and AC version v1.72.4. We began the project in January 2021 and there are a few people working on it so we've stuck to the versions we started with.

    Inventory properties:

    Player inspector:

    Settings manager:

    Trigger inspector:

  • Thanks for the images - can you share the Trigger's Actions as well?

    When the inventory is enabled/onscreen, all triggers are completely ignored = not run at all.

    Are you determining this with the ActionList: Comment Action I described?

    The Unity version is 2019.4.17f1 and AC version v1.72.4.

    Create a new Unity project and import the latest AC release, then copy your Managers, scene and Player prefab into it. Assign the Managers, and the scene should work albeit with no graphics - enabling Gizmos in the Game window should help show where the Player is, though. Does the issue still occur in that?

  • edited October 2022
    Are you determining this with the ActionList: Comment Action I described?

    I first used Dialogue>Play speech to determine that but now tested with ActionList: Comment with the same result. When the inventory IS onscreen as the trigger should be activated by walking past, the dialogue does NOT appear and the console does NOT show the warning/error (and both DO happen, when the inventory isn't onscreen).

    can you share the Trigger's Actions as well?

    Here (but again, the same problem occurs on all of my triggers in every room, no matter what they do):

    Regarding your final suggestion, I suppose the way AC is run in Unity is project-based, not program-based? I mean it isn't like you can have just one version of AC with Unity, so by importing the latest release to one project I'm not affecting another (the actual) project? Of course it'd be unlikely you'd suggest that if that wasn't the case and we have version control so going back shouldn't be a problem either way, I'm just being overly cautious. :p I can try that and hope I'll manage to copy everything correctly. Of course your suggesting this would indicate you're thinking the problem might lie in a known issue that has been fixed in a newer version of AC? I kind of fear changing versions mid-project to fix this could break something else in the game.

  • I mean it isn't like you can have just one version of AC with Unity, so by importing the latest release to one project I'm not affecting another (the actual) project?

    The way Unity's Package Manager works is that the version of a downloaded asset is the same for that version of Unity, but that's separate for what's actually imported.

    Importing into a fresh project won't affect your existing - but using a different Unity version will keep things totally separate.

    Of course your suggesting this would indicate you're thinking the problem might lie in a known issue that has been fixed in a newer version of AC?

    It's something we'll need to determine. Alternatively, you're welcome to PM me the files I mentioned - which may be necessary anyway, as the issue itself sounds particular to your combination of settings.

  • My apologies for not getting back to you, I've been very sick. And now that I'm better, there's a little family holiday trip ahead, so I still can't get back to this before next weekend. Just popped by to mention a thing my friend noticed about this: if the inventory (menu) is open when a scene change happens, the new scene opens with the inventory still onscreen and the game comes to a stop, you can't do *anything*, no clicks have an effect and even the cursor turns invisible. Don't know if these issues are related but they very well could be. I'm not sure if this information helps, just thought I'd mention it. Anyway, I will return back to this next weekend – thank you.
  • Thanks for the update, though PMing me the files is still likely the best way to get to the bottom of the issue.

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.