[Closed] Crowd Cognitive Controllers
I have not checked it, but you can change the team of two of them when they are close enough (the new team would have a speed vary behavior with a center = 0.0, and no wander or seek behavior assigned).
Also inside the same if block, you can change the priorities of bips files in the moflow to see them shaking hands.
Thinking about a different approach:
What if every delegate has a little mesh linked? (may be a plane) at the front and with a little offset.
One team would have a surface arrive behavior with part of these meshes (all linked to the other team’s delegates) as target.
This surface arrive behavior is disabled after arriving and an arrival > speed = 0.0
This way all members of this first team will be seeking every one of the other. Stopping at the arrival (you must play with the offset parameter to get a proper distance).
Of course, the other team have to get a similar surface arrive behavior…
Let me know the results please
Fernando
hi,
i tried the attach a plane and use the surface arrive behavour, but it doesnt seem to keep the planes on it during simulation so it looks a game of musical chairs!! good idea tho.
i had a little think about how to pair up the delagates from each team.
this is just sudo code with a bit of C++ how it mite work
Function First_frame_only (
Team_A_members = (Make an array with the names of the members in team A)
Team_B_members = (Make an array with the names of the members in team B)
Max_number_of_dels = (get number of delates on team B)
For (Team_A = 0; team_A < Max_number_of_dels; Team_A++){
Do{
Target = (ramdom number bewteen 0 and Max_number_of_dels)
[i]//makes a ramdom number bewteen 0 and the max number of team b delagets[/i]
}while (All_ready_targeted != Target)
[i]// All_ready_targeted is an array containg all the team B delagests all ready with //targets[/i]
All_ready_targeted += Target
[i]//adds this number to the array so it cannot be re-chosen[/i]
Team_A_members[Team_A] seek_out_behavour Team_B_members[Target]
[i]//makes this team A delaget seek out this team B delaget[/i]
Team_B_members[Target] seek_out_behavour Team_A_members[Team_A]
[i]//makes this team B delaget seek out this team A delaget[/i]
}
}
any thoughts?
I tried the surface arrive with delegates only. Works fine. The problem is with bipeds.
As they are constrained by the .bips avaliable in the moFlow graph, they cannot arrive to the rigth place and keep walking…
I guess this is not a good solution.
Looking at your code, It’s not necesary to pair up there. You can create 2 teams and assign them the correct behaviors at the Behaviors Assignments window.
What you have to code is the if state, comparing distances between delegates in a for loop.
My doubt is the result of changing teams of a biped during the solve… This will not be a real transition between states.
Fernando
but if they’re not paired up it would mean that u could have 3 of team A delagets doing the shaking hand animation with 1 delaget from team B.
looking at the script now, it mite be more worthwhile having them paired off by distance rarther than just ramdomly.
for the biped solve it mite be quicker and easier to wirte a little script to use different aniamtion clips based on the movement of the delagete blending between the two clips beacuse i find that once the simulation is solved, and the bipeds motion flow is made ect, that the delagets tend to do a lot of ramdom stuff that wasnt in the simulation before.