Forum rules - please read before posting.

Wait function

Hello. I have two questions. I hope you can understand my meaning and desired effect.

Situation:
I have set up some kind of "mini game" within adventure creator. The goals is for the player to move within a certain area that is covered with a trigger to sneak past the guard in order to acces more area's. I've setup a crouch mode, a trigger which detects if the player is within this crouch mode and a pre-set path that the guard will walk. At certain nodes I made a cutscene which sents a message to the trigger to turn on/off.

Question 1:
The trigger does not work and does not detect the player whenever I use messages to set the trigger on, then let the engine wait, then send another message to immediately turn the trigger off again.

Question 2:
How can I let my guard character wait at a specific node in the pre-set path without setting the wait time for EVERY node? Whenever I use the engine --> wait function the entire games pauses for the amount set. I'm looking for a way to let the character guard wait for a set time AND still be able to controll my player.

Thanks in advance!

Comments

  • 1) Triggers are enabled/disabled by sending "TurnOn" and "TurnOff" messages.  Is this what you've been doing?  If a Trigger is successfully disabled during gameplay, the words Current state: Off will show at the top of it's Inspector - check to see if this disappears once you've turned it on.  If it appears correct, make sure your Player has a Rigidbody on him, as Unity requires one for any object you wish to be detected by a Trigger.

    2) Per-node Cutscenes can be used to set a different wait time for each node.  To prevent the Cutscene from blocking gameplay, set the Cutscene to Run In Background at the top of it's Inspector.
  • Thanks for the quick response!
    I had the rigid body on my player present within the scene.
    The problem was that cutscene would "take over" the action list because everything paused.
    I set the cutscene to "run in background" and It works perfectly now!
    Thanks a lot for this amazing and versatile asset!
  • edited January 2016
    about Trigger 2d. How it works? What i should choose in actionlist?
    Sorry, cant find tutorial about this.
  • 2D Triggers work by the same principle as the 3D ones.  You can turn them on/off by using the Object: Send message Action on them, and determine what happens when they're triggered within their own Inspectors.
  • when player enter into trigger area, then must play his speech, but nothing happens.

    image

  • Does your Player have a 2D collider on him, plus a Rigidbody2D?  Unity's physics system requires this to be the case for triggers to work.
  • edited January 2016
    it works, thank you!
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.