Jump to content

Sp00ky11

Pre Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Everything posted by Sp00ky11

  1. Just pointing out that I found the solution from a very helpful person from the steam forums. The issue was due to the target number being switched before the unit had fired at the first one, the target currently being fired upon was the final target I had in the array. The solution was removing the sleep 3; at the end and replacing it with waitUntil {unitReady art1};
  2. Apologies about replying to this old thread but its similar to my issue and I cannot create a thread of my own. I'm trying to make one friendly AI artillery fire at 3 separate targets using script. The friendly artillery is a Zamak MRL with the variable name "art1" I have placed 3 markers down in the editor and called them "target1" "target2" and "target3" The script is activated by a trigger The script works with no errors and actually fires 3 rounds on the first target, "target1" but it doesn't seem to be looping and is not proceeding to fire 3 rounds at the next target, "target2" Here is the script named "ambient_art.sqf": target_array = ["target1","target2","target3"]; target_index = 0; while {(target_index <= 2)} do{ target_choice = (target_array select target_index); ammo1 = getArtilleryAmmo [art1] select 0; tgt = getMarkerPos target_choice; art1 doArtilleryFire[tgt,ammo1,3]; target_index = target_index + 1; sleep 3; } in the trigger, which is fired when the player walk in I have in the activation field script = [] execVM "ambient_art.sqf" Any help will be deeply appreciated
×