Jump to content
Sign in to follow this  
younglegend

Trigger a state with another state

Recommended Posts

Hello ppl. I'm still messing with my new interest on crowds and got stuck in a situation.

So i have 10-15 agents in 'idle' state and among them 3 random agents change their state to 'headshot' ( I'm using pop groups set to random). Now i want the rest of the agents to change their state to 'scared' soon after 'headshot' state is triggered. Here's what i've tried..

1. Made a group/attribute when the headshot state is triggered and use that on the crowd trigger vex. Did not work...

i@trigger = 0;
if (@group_groupname or attribute == 1){
i@trigger = 1;
}

2. Used the state trigger expression directly on crowd trigger. Nope.

i@trigger = 0;
if (s@state == "headshot"){
i@trigger = 1;
}

The only expression that works is with @Frame. I have to manually find the frame where the agent get triggered to the 'headshot' state and enter it. Moreover my next step is to trigger the 'scared' state by radius/proximity.

Any help or ideas is appreciated. Thanks!

Share this post


Link to post
Share on other sites

Solved it! Had to use a sop solver under crowd source. For some reason the crowd trigger weren't updating the particle attributes. Guess it can only read already updated ones.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×