Forum rules - please read before posting.

Trigger error

edited October 2018 in Engine development
Hello. When entering the trigger particle animation does not start. How to fix the error?
https://ibb.co/hVw6YL

Comments

  • In which AC version?

    Make sure your Player has either a Rigidbody and Collider, or a Character Controller - it will not react to triggers otherwise.  You can test that the Trigger is actually running by inserting a Dialogue: Play speech Action to see if speech appears when passing through it.

    You haven't given any information about the object you're trying to affect.  A particle system doesn't work with the Object: Set visibility Action.  Instead, you probably want to use the Object: Send message Action with the Particle Switch component.  See the Manual's "Particle Switch" chapter for more.
  • AdventureCreator version 1.62.6. On the player there are Rigidbody, Collider and Character Controller, but still the trigger does not work. I also tried to insert a dialogue with Play speech and the trigger works. Object type: Send message does not work with a trigger either. My Particle System consists of a GameObject inside this object and there is a Particle.
    https://ibb.co/i88M7f

  • edited November 2018
    You shouldn't have all three components - either a Rigidbody and a Collider, or a Character Controller, which acts as both in one.

    Your GameObject is deactivated, so it won't respond to anything.

    Your message must be sent to an activated GameObject with both a Particle Switch component and a Particle System on it.  When you send the "Turn On" message, it'll turn the particle system on until you turn it off.  When you send "Interact", it'll run once.
  • But I need the GameObject to be enabled by trigger. By default, the GameObject must be deactivated and activated by a trigger. How can I fix the error?
  • Why must the GameObject be disabled?  There's no need for that with the Particicle System - just uncheck "Play On Awake".

    A custom script can be written if you need it disabled for some other reason.  The Object: Send message / Object: Call event Actions can also be used to trigger functions in custom scripts.
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.