God of Monkeys 14 Posted April 26, 2017 Hi, I make a AI attack convoy. This is my step. 1.Drag a group from Groups. (I choice a Motorized Infantry Squad. Transport Truck * 1, Driver * 1 (already on driver seat), infantry * 5 (on ground), the group line all link to that driver, but the team leader is the another AI.) 2.Drag all on ground infantry into that truck. 3.Edit truck's attributes, Turn Off Simulation. (here I have another question, will ask below.) 4.Create a waypoint on truck(move), and gave a condition.(truckGo = true;). 5.Create the others waypoints after first waypoint.(like Seek and Destroy and Get Out Vehicle...) 6.Create a Trigger cover that truck, condition set.(this not very important, but in this case, I use a variable and countdown some time.) and set detect OPFOR in this trigger. 7.In Trigger On Act., I write these code. {_x enableSimulationGlobal true;} forEach thisList; truckGo = true; publicVariable "truckGo"; Question When the trigger start Act., I suppose the AI group will follow my waypoint, but strange thing happen, the truck will stuck at it position. And the AI who is in cargo will start to get in & get out randomly. I try some solution, like let Group leader drive the truck, it will move(move very stutter), and the cargo AI still get in & get out like stupid. In the end I must separate truck's driver and infantry to different group, then use old way set a waypoint for infantry get in truck, truck's driver set a unload waypoint. This will be fine, but workload upgrade. Is there any way can let they stick together in one group and done these things? Additional question I find a question when I use trigger turn on the Unit simulation. When my target is a infantry squad who stand on ground, then use my trigger script(like above), it will work fine. When infantry is in vehicle, I find out my script only will turn on the truck's simulation, but truck's passenger and crew will not active, so I must only turn off truck's simulation except the passenger and crew. I guess this will still waste server performance when I don't want AI start to move, so how can I modify my script to let all OPFOR who is cover by trigger to turn on simulation?(no matter he is in vehicle or not) Thanks Share this post Link to post Share on other sites
Midnighters 152 Posted April 26, 2017 Looks like all the fsm stuff gets screwed up after it's enabled again? Share this post Link to post Share on other sites
God of Monkeys 14 Posted April 26, 2017 5 minutes ago, Midnighters said: Looks like all the fsm stuff gets screwed up after it's enabled again? Yes Share this post Link to post Share on other sites
Midnighters 152 Posted April 26, 2017 1 hour ago, God of Monkeys said: Yes I wouldn't disable simulation in the first place, even if it is enabled back. It'll be like placing a monkey in New York City from the jungle, they don't know where to go. Share this post Link to post Share on other sites
God of Monkeys 14 Posted April 26, 2017 12 minutes ago, Midnighters said: I wouldn't disable simulation in the first place, even if it is enabled back. It'll be like placing a monkey in New York City from the jungle, they don't know where to go. But I want to use this method to save server performance. Or there is another way can convert my Eden editor's group into script version? Can directly convert the group spawn position and waypoint etc... into script ? So I can use call script method to save performance. Share this post Link to post Share on other sites
Midnighters 152 Posted April 26, 2017 44 minutes ago, God of Monkeys said: But I want to use this method to save server performance. Or there is another way can convert my Eden editor's group into script version? Can directly convert the group spawn position and waypoint etc... into script ? So I can use call script method to save performance. Luckily you have the dynamic simulation stuff that BI has implemented, so all that is done by default. 1 Share this post Link to post Share on other sites
pierremgi 4826 Posted April 26, 2017 {_x enableSimulationGlobal true;} forEach thisList; Some questions - if OPFOR presence triggers, so what is the result of thislist ? You don't mention what is the side of the truck. - the enableSimulationGlobal works well for me. So verify thisList. Make the trigger on server only. - as far as the sim is disabled then enabled, you don't need to add a condition in the first waypoint (what for?) 1 Share this post Link to post Share on other sites
God of Monkeys 14 Posted April 26, 2017 9 minutes ago, pierremgi said: {_x enableSimulationGlobal true;} forEach thisList; Some questions - if OPFOR presence triggers, so what is the result of thislist ? You don't mention what is the side of the truck. - the enableSimulationGlobal works well for me. So verify thisList. Make the trigger on server only. - as far as the sim is disabled then enabled, you don't need to add a condition in the first waypoint (what for?) 1.My truck already have a OPFOR driver(Riflemen) on it, so the truck is OPFOR. 2.My thisList result seems like it will have all OPFOR infantry(not in truck, stand on ground) and all OPFOR vehicle(expect vehicle's passenger and crew) cover by trigger. 3.Yes, my trigger is server only. 4.I add condition in first waypoint, because I also write a script at wapoint's On Act., it will transport the waypoint owner group to next waypoint.(I hide these OPFOR Unit at map's corner, so I must transport they to what I specify location) Share this post Link to post Share on other sites
pierremgi 4826 Posted April 26, 2017 So, what fires your trigger? I don't understand how you can have a disabled RED unit already inside the trigger without firing at start. I don't understand the chronology of your trigger and when thislist works for the truck. Share this post Link to post Share on other sites
God of Monkeys 14 Posted April 26, 2017 3 hours ago, pierremgi said: So, what fires your trigger? I don't understand how you can have a disabled RED unit already inside the trigger without firing at start. I don't understand the chronology of your trigger and when thislist works for the truck. My trigger will start to countdown 60 sec after Player get into a town. (detect BLUFOR in trigger) Then after 60 sec the trigger will Act. {_x enableSimulationGlobal true;} forEach thisList; truckGo = true; publicVariable "truckGo"; This trigger is cover a OPFOR group who is turn off simulation when game start(Use Eden editor edit group's attributes, not by script). Then trigger will turn on all OPFOR Unit within its area scope. After OPFOR turn on simulation, then they will follow 1st waypoint and transport(by script in On Act.) to 2nd waypoin and move to 3rd waypoint ........ I will make a demo mission and upload here to you, let you check my method. :) Share this post Link to post Share on other sites
God of Monkeys 14 Posted April 26, 2017 I find a solution, that is I don't drag infantry into truck, just gave them waypoint. When start, leader will auto order everybody get in truck. Share this post Link to post Share on other sites
Midnighters 152 Posted April 26, 2017 1 hour ago, God of Monkeys said: I find a solution, that is I don't drag infantry into truck, just gave them waypoint. When start, leader will auto order everybody get in truck. still doesn't help that the pathing loses functionality. Share this post Link to post Share on other sites