Forum rules - please read before posting.

making a generalized door open action



I have several multi-function doors in my scenes they can be
opened with command ‘E’, by being near or by a key or keycard and closed never
or after a time. I have several Action lists to accomplish this and would like
to combine them in a big Action List with parameters that I can use from the Inspector or with a script?.
Can you suggest what would be my best approach to do this?



Comments

  • I don't know how the 'E' key is linked up to open doors already (presumably it's set as the InteractionA input), but you could consider using Active Inputs (Manual's Section 2.14).  These give you full control over when an input is available, and what they do.

    An ActionList with a GameObject parameter and a float parameter could be used to animate a dynamic object over a set time.  The GameObject parameter would determine what door gets animated, and the float parameter could control the delay before closing it again (Engine: Wait) where a value of e.g. -1 would keep it open indefinitely.  ActionList: Check parameter would let you do that.

    Normally, parameters are set at the time their ActionLists are run (when called using ActionList: Run).  However, you can also set them through script beforehand - so you could create e.g. trigger scripts that set these values as appropriate when the player enters one.

    Parameters are stored within the ActionListAsset class' parameter List.  However, this does give me the idea to create an ActionList: Set parameter Action, so you could concievably do this from within a normal AC Trigger.  I shall look into that.
  • I am almost there. I have used just one script which only sets true or false a series of global variables that I can set in the inspector for each door. A trigger at the particular door checks all of these variables in a kind of switch case.

    On the side:

    Because this trigger action list is quite big and complex to do the above it would be very,very nice to be able to show only  a comment  in each Action box (lke PlayMaker has), it would be good for debugging and for when, after a few weeks, for following the spider web of arrows. Showing just the comment on top would be very helpful.

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.