Forum rules - please read before posting.

Trigger with Parameters

Hi to all and hi to Chris,
i' have a question about Parameters in AC.
What is the right method to set a AC TRIGGER with an ActionList Parameters?

My sequence is:
1 - spawn a prefab in the scene with integrated trigger
2 - walk with player on the prefab spawned and the object destry (with action Object remove)

I would like walk with the player and collect coin. Obviously when the player go on the coin spowned the coin is removed.

My problem is when the player go on the coin all the action list work (add the score, play sound etc...) but the coin won't remove.

In console it write tha the "ActionList CAMPANELLO PREFAB was removed while running" but CAMPANELLO PREFAB is my prefab that contain the Trigger + object.

Thanks for your time,
Paolo :)

Comments

  • edited March 2019

    I explain in better way with images my question…

    prefab_1.png is the prefab of my object spawned that i want collect .

    https://www.dropbox.com/s/z8x3ipjpposmzgc/prefab_1.png?dl=0

    prefab_2.png is another view of the content of my prefab.

    https://www.dropbox.com/s/urqzzpn3edt4u2i/prefab_2.png?dl=0

    actionList_1.png is the ActionList linked to the Trigger of my prefab

    https://www.dropbox.com/s/8oyx4j22rw6tl19/actionList_1.png?dl=0

    actionList_2.png is the ActionList with Parameters. All in this actionlist work but not "remove".

    https://www.dropbox.com/s/juzqyblmubyqzj2/actionList_2.png?dl=0

    error_console.png is the error in Console

    https://www.dropbox.com/s/8de8wine9zqpvtk/error_console.png?dl=0

    Thanks,
    Paolo

  • edited March 2019

    The strange thing is when i walk over one of the spawned prefab: sometimes the prefab is removed, sometimes not… but all the others actions in the same ActionList works (like Score, sound etc...)

  • SOLVED
    Ok, i've solved in another way, maybe the right.

    I've put inside my player a AC TRIGGER that detect object with TAG "campanelli".
    I've set in my object the TAG "campanelli" and work.

    My new question is:

    i've already a DetectionHotspot with a Sphere collider set to trigger. And i have a second Sphere collidere with trigger for my AC TRIGGER more more small.

    I need detect hotspot much distance with Sphere bigger and detect "coin" with Sphere smaller.

    How can i do?

    Thanks,
    Paolo

  • I need detect hotspot much distance with Sphere bigger and detect "coin" with Sphere smaller.

    The two can be on separate children of the Player - don't place both of your Sphere Colliders on the same GameObject.

    As for the original issue, try unchecking Wait until finish? on the ActionList: Run Action in "actionList_1.png". It's currently waiting for the sequence in "actionList_2.png" to complete, hence the error message.

    What are your AC version numbers?

  • Hi Chris, Thanks. I use last version 1.66.8.
    The 2 colliders are already on 2 separate children. One is on root of the character (with Player, rigidbody etc) and another in a children for HotspotDetect (linked in Player script).

  • edited March 2019

    You say 2 separate children, but then say one is on the root.

    Move the Trigger to a child of the root - and configure it to detect objects by tag, and assign a tag that the other Triggers have been tagged with. The next AC update will provide an option for Triggers to react by colliding object position, without need for a Rigidbody to be involved.

    What exactly is the issue after attempting this method?

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.