Jump to content
Sign in to follow this  
forzajuve

doFire doesn't work?

Recommended Posts

I'm making a mission where there are a couple of AI shooting ranges. I used the doFire command on some vehicle wrecks and it worked fine but since a few days it has stopped working for no obvious reason. I can hardly get it to work at all and haven't found a good solution to force the AI to fire either. Could a recent update have broken doFire? 

Share this post


Link to post
Share on other sites

With a bit of tweaking that seems to be working but it definitely seems like something has changed. They won't engage targets further than like 10-15m and not at all on the shooting positions at the firing range. I also can't get them to stop firing now


while {true} do {
    s4 doSuppressiveFire trg6; 
    sleep 3;
    s5 doSuppressiveFire trg6; 
    sleep 2;
    s6 doSuppressiveFire trg5; 
    sleep 2;
    s7 doSuppressiveFire trg5;
    sleep 3;
    };

is there a way to stop this? 

Share this post


Link to post
Share on other sites

With a bit of tweaking that seems to be working but it definitely seems like something has changed. They won't engage targets further than like 10-15m and not at all on the shooting positions at the firing range. I also can't get them to stop firing now


while {true} do {
    s4 doSuppressiveFire trg6; 
    sleep 3;
    s5 doSuppressiveFire trg6; 
    sleep 2;
    s6 doSuppressiveFire trg5; 
    sleep 2;
    s7 doSuppressiveFire trg5;
    sleep 3;
    };

is there a way to stop this? 

 

Use a variable for the while loop and change it's value to be false once you want to end it.

Share this post


Link to post
Share on other sites

like public variable? i am trying this but not working now

 

range1.sqf

while {rng1=true} do {
    s4 doSuppressiveFire trg6; 
    sleep 3;
    s5 doSuppressiveFire trg6; 
    sleep 2;
    s6 doSuppressiveFire trg5; 
    sleep 2;
    s7 doSuppressiveFire trg5;
    sleep 3;
    };

trigger 1

condition: true
on activation: rng1 = true; 
publicVariable "rng1";

trigger 2

condition: rng1 = true
on activation: abc = execVM "range1.sqf"; 

Share this post


Link to post
Share on other sites


while {rng1=true} do { //That is incorrect, = means you set the value of a variable == means you check the value of a variable. In your case however, you can do it as follows:

while {rng1} do {

Share this post


Link to post
Share on other sites

Ok I think I fixed it, I simply changed the targets from wrecks of vehicles to actual vehicles and it works now with just doFire. Looks weird but better than nothing. Strange that it stopped working on wrecks though.

Share this post


Link to post
Share on other sites

Not strange really it's par for the course, BIS have never been keen on allowing the AI to fire at what they're told to fire at if it's not an actual enemy.

These commands have often been broken or not fully implemented.

There was at one point in Alpha testing invisible objects that the AI would target and  fire at without having to issue orders but of course on release they were removed..

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×