Jump to content
Sign in to follow this  
etekiller

Problems with doFire command.

Recommended Posts

Hello, that's my first post on this forum so I would like to say hello to you all! :)

I've got one simple problem, the doFire command seems not to work for me. I've searched this forum for possible answers but I've only found one thread that actually has not been resolved yet. In any combination the doFire command only targets an object/unit without making the soldier shoot his weapon. I have no idea why it works like that. I tried to combine this command with the doTarget and selectWeapon but still it has no effect. How can I make the soldier shoot his weapon at a target correctly?

I would appreciate any answer, thank you!

Share this post


Link to post
Share on other sites

Hey, and welcome to the forums. :)

How do you execute the doFire command? Per trigger or init, or script?

What do you use first, doTarget or doFire?

I've tested it quickly with a Radio Alpha Trigger and it seems to work just fine.

What's the range between the two units, and are there any obstacles in the way, such as houses, walls etc?

Share this post


Link to post
Share on other sites

Thank you very much for a reply :).

After you wrote that post I've tried to run the script with a trigger. With no success. Soldier looks at the target, aims at it and does not shoot.

The exact code I am using is:

player1_1 doWatch desk1; player1_1 doTarget desk1; player1_1 doFire desk1;

Don't ask me why "desk1", just a random name to train scripting :).

EDIT: For testing purposes I've put those units 2m away from each other. I forgot to state that those units are from the same fraction, both US marines, but I wan't one killing the other anyway. If there is a mechanism to prevent scripts from killing soldiers of the same fractions then how can I surpass it? I've tried this soldier to shoot at a table with the same result, so I doubt that the fraction has something to do with it.

Edited by etekiller

Share this post


Link to post
Share on other sites

That explains why he doesn't shoot him, because they're both BLUFOR.

Honestly I can't really come up with anything easy to make a BLUFOR soldier switch to OPFOR, but you could try this:

//Edit: I've tried placing two US Marines adjacent to eachother, and if I use a Radio Alpha trigger, putting this in it:

rifle doTarget rifle1;
rifle doFire rifle1;

It works. The Rifleman shoots the other one.

//Edit2: Removed the method with the join group. Doesn't work if the OPFOR Rifleman isn't spawned.

Edited by tryteyker

Share this post


Link to post
Share on other sites

Wow, so actually the method of launch is crucial? That's kinda stupid, but I think you have just solved the biggest pain in the ass in this game :D. Thank you.

Share this post


Link to post
Share on other sites

Well, remember to use Target before Fire. You don't necessarily have to trigger it via Radio though.

Share this post


Link to post
Share on other sites

Hmmm I've tried that and it doesn't work for me : (. Have you tried it more than once? maybe it was just a one lucky try?

Share this post


Link to post
Share on other sites

Not tested but should work whether the unit is spawned or not.

newgroup = createGroup EAST;
[rifle1] joinSilent grpNull;
[rifle1] joinSilent newgroup;

rifle dotarget rifle1;

EDIT1: Variables were local. Made the variables global.... so it should work in a trigger.

EDIT2: Make sure you have an OPFOR on the map... or add this to the init.sqf.... or it won't work.

EastHQ = createcenter EAST;

Edited by twirly
Clarity and added stuff

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  

×