question

Jacob E2 avatar image
0 Likes"
Jacob E2 asked Jacob E2 commented

Use different load animation based on flowitem

Hello,

I have an operator that has to push carts, and also load material into a machine. Is there a simple way to change the load animation (and location of the flowitem relative to the operator) depending on the flowitem the operator is carrying?

pushcart.pngcorrect-load-machine-animation.png

Above are the 2 animations I would like. I am able to change to one or the other, but I'm not sure how to incorporate both using one operator. I would prefer to avoid using code if possible. I'm fairly proficient with process flow if that is the only other option. Below is what I currently have. Change Visuals on Load.fsm

current-load-machine-animation.jpg


FlexSim 21.0.6
operatorloadoperator animation
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Jacob E2 commented

You might be able to do it with the "Run Animation" process flow activity, but using code (only a single line) is probably much easier. You can listen to the On Entry trigger of the operator with an Event triggered source in process flow. Depending on some condition (item label/size/etc) the token is send down different paths and does two things:

1. Set the "walkLoadedAnimation" variable of the operator to change which animation is used if the operator has loaded something. The animation Names are the same you woud set in the operator's properties.

object.setVariable("walkLoadedAnimation", "animationName");

1638971836283.png

2. Change the position of the item inside the operator (if necessary)

I'll attach an example model where this is done for two different item sizes; one being carried, the other one pushed.

ChangeWalkAnimation_21_0.fsm


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jacob E2 avatar image Jacob E2 commented ·
Thank you so much @Felix Möhlmann! This is exactly what I was looking for.
0 Likes 0 ·