OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pipski on 29 Jan 2004, 19:20:50
-
Hi, what's the best way to get NPCs (enemy NPCs) to target specific buildings? In this instance I want an Su25 to plaster a church with rockets. I've tried putting an invisible H on the church and ordering it to target that but it doesn't do anything.
Also, I need to know the names of the weapons and ammo carried on a default Su25. If it's in the comref, I'm not sure which they are. There are numerous rocket names (Zuni? 57mm? If so which one?) and I have no idea what the Su25 cannon is classed as. Anyone point me in the right direction?
-
Ed Depot - tutorials - references - weapons and ammo listings
There is an invisible target addon somewhere in internetland.
-
Shouldn't you be able to put a gamelogic in there to be targeted?
Or if the building is non enterable, use a unit and a destroy waypoint for the SU25. I think.
By the way, I'm pretty sure that all 30 mm cannons are the same on helicopters and planes, they're classified as
"MachineGun30" this works well when it is added to UH60mgs, jeep with mg, and M2s.
-
Sadly you can't target GLs.
-
Ahhh so that's why my guys wouldn't shoot at the sky or tanks just for fun..... :tomato:
Anyway sorry Pipski, I gave you the wrong 30mm cannon, sadly the one I gave was from helicopters and not planes. The plane ones shoot four or five 30mm rounds at once and have 2000 ammo. I'm not sure what the code is. :noo:
I found out testing 1.95's AI dogfighting ability cause I can't get 1.96 to start.... :(
I tried me a SU25 with extra heli 30mm cannon vs 20 thunderbolts on Skye island, hurray! I won well cause even though dogfighting is improved, the planes can't react well to mountains and me flying around 20 the whole time hehehe.
All they saw was this :booty:
Then crash and burn :beat:
:cheers:
-
Yeah, it's "MachineGun30A10" perversely enough and "Rocket57x64". Still can't work out what the missiles are, they don't seem to correspond to anything in the ComRef.
-
use dowatch in a loop. Have it dowatch(target) at a certain distance, or some other condition. Ya, theres also the invisible targets mentioned by Macguba. Dowatch the H .
The SU25 weapons and the ammo fired from them is as follows:
Missles-----CH29TLauncher--Fires->CH29T
rockets-----Rocket57x64--Fires->rocket57
Gun-----Machinegun30A10--Fires->bullet30
Use this on a player controled vehicle or whatever in its INIT to get the name of the weapon and what it fires.....
this addeventhandler ["fired",{hint format ["Name of shot is: %1,%2", (_this select 2),(_this select 4)]}].........
Then after getting names, use ....nameofvehicle fire ["nameofgun","nameofammo"]
This is the method i use. Never failed :)
-
Cheers Azrael, Ch29TLauncher isn't in the comref for some reason! Nor in any of the other lists of weapons and ammo I've been poring over! Cheers for those interrogating Init commands. Found that the invisible targets work a treat so am using those now.
-
Add it to the list in the Ed Depot with a Comment.
-
So how would i do these invisible targets, anyone have a link to a tutorial
-
d/l the addon, unzip the .pbo into `addons', then put the invisible targets wherever you want them via the editor (NB: ignore the readme when it says they're under `Empty' `Targets', they're under `Empty', `Objects' `I' (for invisible).)
http://www.aef-kampagne.de/english/feat_invTargets.htm
That's a link to the addon.