TACRfan Posted March 1, 2016 Report Share Posted March 1, 2016 Is there a way I can command multiple objects to redirect via one command on another object? so I have two signs which are technically vehicles that I want at either end of the road and then I want an object next to the fire station with the redirect command which will make these signs start redirecting vehicles. i could do it so the signs redirect individually and then link it as a group but I would much rather if it's possible linking them to one object and one command. thanks Quote Link to comment Share on other sites More sharing options...
Ace Posted March 3, 2016 Report Share Posted March 3, 2016 I'm not sure what you mean but if you click on units while holding ctrl you can select multiple at once. Quote Link to comment Share on other sites More sharing options...
TACRfan Posted March 4, 2016 Author Report Share Posted March 4, 2016 What I mean is you have an object (let's say the warning lights for a railway crossing, but it is actually classed as a vehicle) that object has a redirect command, there is also one of these at each end of a road, if you activate that command it redirects all vehicles in front of it, you have to press it individually or as you say hold CTRL and press both of them and activate it so both start re directing. what I want to know is if there is a way to have both of the objects at the end of the road as before but then have a control panel outside the station with the redirect command which activates both signs instead of them individually. 3 objects 2 to redirect vehicles at either end of the road 1 to control both of the objects that redirect Quote Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2016 Report Share Posted March 4, 2016 Hm Dyson made Brooklyn or manhattan fire fighters go out and stop traffic maybe somewhere along those lines? It's definitely possible tho biebersfield had a traffic light next to station to stop traffic which you could press using the engine Quote Link to comment Share on other sites More sharing options...
bma Posted March 4, 2016 Report Share Posted March 4, 2016 Short answer, yes it is possible. I dont have my computer on me, but what you basicly want is to name the two vehicle the same thing and then use a for loop to call both of them at the same time. The only major problem I can see with your idea is that it isn't possible for vehicles to redirect, it is only possible for persons. So it would be much easier if you changed your signs to be persons instead Quote Link to comment Share on other sites More sharing options...
TACRfan Posted March 4, 2016 Author Report Share Posted March 4, 2016 3 hours ago, bma said: Short answer, yes it is possible. I dont have my computer on me, but what you basicly want is to name the two vehicle the same thing and then use a for loop to call both of them at the same time. The only major problem I can see with your idea is that it isn't possible for vehicles to redirect, it is only possible for persons. So it would be much easier if you changed your signs to be persons instead I mean using the VCmddirectional lights command Quote Link to comment Share on other sites More sharing options...
bma Posted March 4, 2016 Report Share Posted March 4, 2016 2 minutes ago, TACRfan said: I mean using the VCmddirectional lights command Seems like a little weired workaround if you ask me. But sure it is possible. You just need to call it with a for loop GameObjectList gol = Game::GetGameObjects("NameOfTheVehicle"); GameObject *go; for (int i = 0; i < gol.GetNumObjects(); i++) { go = *gol.GetObject(i); go->PushActionExecuteCommand(ACTION_APPEND, "VcmdDirectionalLightsOn", go, 0, false); } Something like that Quote Link to comment Share on other sites More sharing options...
TACRfan Posted March 4, 2016 Author Report Share Posted March 4, 2016 23 minutes ago, bma said: Seems like a little weired workaround if you ask me. But sure it is possible. You just need to call it with a for loop GameObjectList gol = Game::GetGameObjects("NameOfTheVehicle"); GameObject *go; for (int i = 0; i < gol.GetNumObjects(); i++) { go = *gol.GetObject(i); go->PushActionExecuteCommand(ACTION_APPEND, "VcmdDirectionalLightsOn", go, 0, false); } Something like that Ok thanks Quote Link to comment Share on other sites More sharing options...