OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ronf on 04 Jun 2003, 16:52:13

Title: how to make a unit use...
Post by: Ronf on 04 Jun 2003, 16:52:13
its rgplauncher/lawlauncher against an object? in my case i want to have that guy go to a training camp, take an rpg/law and shoot an armored target (the one from the objectlist).

i tried several action and dotarget commands but the guy just walks to the wp and then does nothing :-( he just fires when its an enemy vehicle, and i dont want enemy vehicles in trainingcamps...

any solutions?

thanx ronf
Title: Re:how to make a unit use...
Post by: SimonRussi on 04 Jun 2003, 17:54:57
have you tried doFire?

*edit
I had the same problem with the normal targets and rifles, and had to download an addon called TargetE. I think you need something like that
Title: Re:how to make a unit use...
Post by: Komuna on 04 Jun 2003, 17:56:00
? Strange... I thought that if you combine dotarget with dofire it would work... Anyway, have you tried to combine _unit DoTarget _target with _unit Fire ["RpgLauncher","RpgLauncher"]... I can't promisse you anything, I couldn't make it work either... ??? :-\

But is it for a cutscene? If so, why don't you CamCreate the rocket at the soldier's position, towards the target...? It would require a litle of trignometry, but it would work.

And... what if you set your target to enemy (at mission.sqm), set it captive (init: this setcaptive true) and set it enemy again (this setcaptive false) when you want your soldier to destroy it...? Once again, I can't promisse you anything.
Title: Re:how to make a unit use...
Post by: LCD on 04 Jun 2003, 18:24:07
unitname selectweapon (secondaryWeapon unitname)

unitname dofire object

shud b workin ;)

weaponname

LCD OUT
Title: Re:how to make a unit use...
Post by: Tomb on 04 Jun 2003, 19:13:44

...I want (a guy to) go to a training camp, take an rpg/law and shoot an armored target.

...any solutions?




 :) check THIS (http://www.ofpec.com/yabbse/index.php?board=13;action=display;threadid=9867) out, m8, if anything else fail.