playMaker

Author Topic: Need some help  (Read 380 times)

tovst

  • Playmaker Newbie
  • *
  • Posts: 2
Need some help
« on: November 08, 2022, 03:37:40 AM »
I'm trying to get a loop to work correctly.

The loop will work correctly except for State 4 where the trigger is created on the specific store chosen randomly from my array.

There is also output to a basic UI that updates throughout the loop. This UI updates correctly despite the fact that the trigger never changes to the correct new child chosen randomly. This however does show that the issue is with the trigger and nothing else.

The trigger does however work on the first child chosen. This happens no matter how many times it loops any interaction with the first child will return success.
 
tl;dr

Why is my trigger not changing when the logic loops and selects a new object child for trigger yet displays the correct new child to UI????


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Need some help
« Reply #1 on: November 08, 2022, 10:43:22 AM »
Hi.
Trigger event actions work only for a single object as they are dependent of a component that will be created (if not yet there)
do it will create for the 1st one then it will not change to a different one.

What you can do is set a fsm on each object with a trigger action (you can make it set a bool for example)
Then on the main fsm you can do for example a "Fsm Bool Test" (Ecosystem)

if you have a lot of triggers, this might not be the best way.

Can you give more details on what the triggers do

tovst

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Need some help
« Reply #2 on: November 08, 2022, 03:12:31 PM »
What you can do is set a fsm on each object with a trigger action (you can make it set a bool for example)
Then on the main fsm you can do for example a "Fsm Bool Test" (Ecosystem)

if you have a lot of triggers, this might not be the best way.

Okay and yes that's what I was trying to avoid doing. The triggers right now are a place holder for what eventually will be picking up an actual item. Each trigger represents a store that on entering takes the place of picking up the order.

Maybe it will be easier in the long run to have an object spawn point in each store that matches the random child chosen that when interacted with causes the order to be picked up. This way I can avoid using triggers for something they aren't intended for!

Thank you for your reply!