Forum rules - please read before posting.

Question about Component Variable (Object)

https://drive.google.com/file/d/1PuD43BXeQTZiP3ynif9pVAPG1TyWf16C/view?usp=sharing
https://drive.google.com/file/d/18zE55qz5awp-R5e4jyemrSB90jR9Y0fw/view?usp=sharing

Hi all,

Hope everyone is having a great weekend. I'll cut to the chase. I'm trying to prefab as many of the systems as I can for a new game I'm working on. I'd like to create specific prefabs that do specific things and simply clone them, without needing to drag anything into an ActionList.

For context: what I'm trying to do now is make a prefab with a trigger. When the player enters that trigger, a climb animation is triggered. After the animation finishes, the character is teleported to a 2D Marker.
The end result = half a left/right climb prefab that I can duplicate as many times as I want in the same level.

Where I've hit a brick wall is with the 2d marker. I've followed tutorials and redone the same system multiple times using Component Variable (Game Object) and Parameters, but the issue still occurs. When I clone the prefab and add two triggers into a scene, the second trigger points to the marker in trigger one.

I've attached the full setup. I'm sure I've missed an obvious setting. I assume the issue is in the Parameters of the ActionList, specifically with the Default Value and Default Value (CID #). Any help would be greatly appreciated.

Thank you, and have a great weekend.

Comments

  • The ActionList's Marker2D parameter is separate from the Variables component's Marker2D variable, and the latter isn't necessary.

    You need to ensure that when the ActionList is run, the parameter value is set to the correct Marker. You can do this by attaching the Set Trigger Parameters component to the prefab and assigning the Marker child in its Inspector.

    A video guide to this workflow can be found in the Logic Prefabs tutorial.

  • Thank you! It's been driving me freakin' nuts.

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.