question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Regan Blackett edited

How to change transporter speed as required in code

I have a vast travel network with many transporters on them. I need to change the Max Speed of some transporters on some of the paths. I know I can set speed limits on connections but that is not what I'm looking for.

I wanted to use a Trigger onArrival on the NetworkNode to something like:

Condition1, condition2, then

if (toegde == NN110) traveler.maxspeed = 2;

But I can't find how to access maxspeed ?!?

Thanks,

FlexSim 17.1.4
transporter speed
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

·
Regan Blackett avatar image
1 Like"
Regan Blackett answered Regan Blackett edited

The old FlexScript way is still probably the easiest:

setvarnum(traveler, "maxspeed", newspeed);

A dot Syntax approach would be:

traveler.attrs.variables.subnodes["maxspeed"].value = newspeed;

Unless Task Executers were to be defined as a Class unto themselves someday I don't think there is going to be a more direct way than one of the above.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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