OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: CptBravo on 02 Nov 2002, 20:34:05
-
Hi,
I just downloaded the the Lynx Smoke Generator vehicle. The question is how do I make the AI use it in battle? Is there a script to make the unit fire its weapon without knowing the weapon's name?
Thanks for your help.
-
Hmm .. this question must be a lot harder than I thought!
Anyone???
-
( if you command it) try to tell it to target so mething and tell it to engage.
Dont know if this works so dont be to happy ;D
-
If I'm commanding, it then I have no problem using the smoke genrator. The problem arise when I assign an AI to the vehicle. The AI never use the smoke generator! I have tried using the command "a DoFire b" with game logic and enemy units! but nothing happened.I have used "destroy" waypoint over enemy /logic units and still no luck!
Any other Ideas are very much appreciated!
Thanks
-
Dont know if this will work or not but try it.
First Give your smoke generator a name and in in the initialization line (MyLYNXNAME) doTarget (TARGETNAME)
Next put in an empty object that can be fired upon
it must be a west or east object I havent had any luck getting units to fire on civilian stuff ,try empty camera Effect
in your editor and use Effect flare and give it a name
Now Place a trigger and name it (triggerName)
Make the trigger 5x5
Activation Vehicle so group your trigger to the LYNX
NotPresent Repeatedly
OnActivation TARGETNAME setpos [(getpos LYNXNAME select 0,20) ,getpos LYNXNAME select 1 ] ; TriggerName
setPos [getpos LYNXNAME select 0, getpos LYNXNAME select
1] ; LYNXNAME doFire TARGETNAME
Play with the numbers a bit cause you can set position below ground level for the target making it not visible to yourself but the AI can still see it to a point.
Like I said just give it a try It worked for a soldier I was testing other night had a radio hopping around behind him
like a big ole frog, I wont guarantee this will work but
scripting for me is still a mystery so I mostly use triggers
If you want the unit to stop smoking either in a way point or in a trigger Initiated by a radio command
ON Activation deleteVehicle TriggerName