Changing Travel Speed While Traveling Astar

Changing Travel Speed While Traveling Astar

jpokornyAXJ2L
Participant Participant
37 Views
4 Replies
Message 1 of 5

Changing Travel Speed While Traveling Astar

jpokornyAXJ2L
Participant
Participant

[ FlexSim 23.2.1 ]

Trying to set the speed of an object, copied this code I found but it doesn't seem to work any suggestions

1703191693374.png

0 Likes
Accepted solutions (1)
38 Views
4 Replies
Replies (4)
Message 2 of 5

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Have you debugged this? Is token.Agent pointing to the task executer or to an Agent class? If it's pointing to the Agent then you'll probably need to refer to token.Agent.object to set the speed and do the preemption. If you post the model we can tell you for sure.

0 Likes
Message 3 of 5

jpokornyAXJ2L
Participant
Participant

I was able to get it with help from your response thanks1703260197520.png

0 Likes
Message 4 of 5

jason_lightfootVL7B4
Autodesk
Autodesk

Use the setProperty command to avoid that mistake - well spotted.

0 Likes
Message 5 of 5

jason_lightfootVL7B4
Autodesk
Autodesk

Hi @JP117, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes