Psilocybe 3 Posted March 28, 2013 Hi guys. I have just begun trying to create scripts and I have been failing at every interval, basically I have created a little plan of what I am hoping to achieve, and tried to begin writing the script only to find myself shaking my head in frustration. //Planned events Check if squad of soldiers are in combat If in combat, soldiers will adhere to the "Combat Get In" Module Check if all living soldiers within group are inside the vehicle Soldiers retreat at full speed to a designated Marker// I want to call the guys under attack grp1, but I am not really sure how to achieve that, however this is where I began, and soon realized I was not on the right track. I am mostly hoping for some help in going the right way, but not be spoon fed the answer as I am trying to learn the processes. if (grp1 behaviour "combat") then {combatmode grp1 == "Blue"}; Share this post Link to post Share on other sites
swiftn7 1 Posted March 28, 2013 It should work by placing the "Group Modifier - Combat Get In"-Module and syncing the vehicle and your AI group with the module. Afterwards define a waypoint where they are supposed to retreat to. Could be even easier when you group the vehicle and the infantry, so the vehicle will wait until the whole group is in (if not using an empty vehicle). Share this post Link to post Share on other sites
Psilocybe 3 Posted March 28, 2013 It should work by placing the "Group Modifier - Combat Get In"-Module and syncing the vehicle and your AI group with the module. Afterwards define a waypoint where they are supposed to retreat to. Could be even easier when you group the vehicle and the infantry, so the vehicle will wait until the whole group is in (if not using an empty vehicle). Hey, thanks for the reply, I have done what you suggested, but I am really interested in learning to script and figured it would be a good learning project to try to write. Thanks for the input, I appreciate the time you took to reply. Share this post Link to post Share on other sites
swiftn7 1 Posted March 28, 2013 (edited) Hey, thanks for the reply, I have done what you suggested, but I am really interested in learning to script and figured it would be a good learning project to try to write. Thanks for the input, I appreciate the time you took to reply. The problem with scripting is to have the correct syntax. Starting with your initial try if(grp1 behaviour "combat") then {combatmode grp1 == "Blue"}; It should look more like this (not 100% sure though): ?((grp1 behaviour) =="COMBAT") : setcombatmode grp1 =="BLUE"; Edited March 28, 2013 by SwiftN7 Share this post Link to post Share on other sites