Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About solrac24

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. solrac24

    AI Using Flares

    I know this is an old thread but I think I have the perfect solution to this problem of getting AI units to fire flares. Place an OpFor Grenadier on a map and edit his loadout to add flares to his vest, give the grenadier a unitname in the Object Init Variable Name field. Place the BluFor invisible soldier from CBA as a target for the AI Grenadier unit to point at and give it the name "target" in the Object Init Variable Name field. Untick the Enable Simulation and Enable Damage boxes in the Object Special States field. Set the invisible soldier at the height and distance so that the AI Grenadier soldier can point at. Place a trigger and set the On Activation field with [] execVM "fireFlare.sqf", set the condition to true (just for testing) Place in the mission folder the following script named fireFlare.sqf :- unitname setUnitPos "UP"; unitname setCombatMode "BLUE"; // stops the Grenadier from firing bullets at the invisible soldier. sleep 2; target enableSimulation true; // the Grenadier can now target the invisible soldier. unitname doTarget target; sleep 6; unitname fire ["GP25Muzzle", "", "CUP_IlumFlareWhite_GP25_M"]; // I used CUP units and CUP flares ... note the second parameter MUST be empty to work. target enableSimulation false; unitname disableAI "autoTarget"; // the Grenadier will stop pointing at the invisible soldier. sleep 4; unitname setCombatMode "YELLOW"; // the Grenadier is now free to use his weapon and grenades to engage any other enemy units. unitname setUnitPos "AUTO";
  2. I like the new CWA Resistance 2.01 engine and the extra scripting commands are great. However dynamic createMarker works ok but other commands like getMarkerPos do not work with it. I can place a marker in the editor and all other related marker commands work with it, but not if the marker is dynamically created with the new scripting command createMarker. example: onMapSingleClick {["camMarker" setMarkerPos _pos]} does nothing with a dynamically created marker but works fine with the same marker put in the editor. Edit: Ignore this it works just fine. I discovered I was using the variable name for createMarker incorrectly.