OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Barbolani on 01 Aug 2007, 19:06:52
-
Hello all!
First of all, thanx OFPEC for this great resource for mission makers.
Im "old" to OFP-ArmA, but Ive never tried to make my own missions seriously...
Now im starting with one simple mission, and Im encountering problems trying to make an AI chopper attack a radiostation.
I searched in the forum but, the closest thing i found is how to make a tank dowatch a building and just fire... in this case dowatch is useless (i think).
But the wrost thing is that im trying to investigate with dotarget object xxxx and the object syntax dosent seem to work in arma as it worked in OFP, and the new COMREF is not clear in this matter.
The problem could be just solved camcreating an explosion while the chopper fires randomly, but I wanna be more polite...
Can you expert scriptors help me?
Thanks in advance.
-
You could use an invisible target from Mapfact's Map_Misc addon here (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=84a1bb50b4f0abda33a1b1e6e9d5668a;act=ST;f=70;t=58052;hl=map_misc).
-
Thanks Mr peanut, but I think there must be a way with scripting... before using an addon maybe its better to place an enemy light armor close to the tower and destroy the tower with a camcreate right after not alive the armor
-
I think a chopper will attack a roadcone if told to do so.....? Never tried it, but place a road cone right next to the tower, and you can even setDamage 1 on the tower after the roadcone is dead?
-
have you tried do target ... do fire ... with a marker or logic as target
also make choper aware of target ...
havnt tried it myself might work
i will take a look in editor
-
Thank you all!!
As far as a I see doTarget doesent work with buildings. The sollution is to place some "dotargetable" object like a rodacone a barrel or a vehicle.
But here comes the problem B, that worries me much more: the sintax of the "object xxxx setdammage 1" doesent work!!! Ive tried a copy paste from the forum and didnt work. In fact I copy / pasted the comref syntax too, and didnt work. :blink: :blink: :blink:
What am Im doing wrong?????
-
You are doing nothing wrong, the 'object id' command is obsolete in Arma.
Try instead something like:
badbuilding = someposition nearestObject objectID;
badbuilding setdamage 1;
Planck
-
Thnx Planck,
But as far as i know with commands I cannot understand well what does mean your code... Sorry..
Could be something like place a barrel very close to the radio tower, name it b1, an then:
_badbuilding = nearestBuilding b1
_badbuilding setdammage 1
???
-
Hi,
Dunno if this is any good for what u r doing, as it is for effect only:
(using a trigger "trigger1")
(playsound "ari" is a rocket sound effect)
; playsound "ari"
; ~3
_pos = [(getPos trigger1 select 0),(getPos trigger1 select 1)]
_b2 = "Bomb" createVehicle _pos
_b2 setPos _pos
_b1 = "M_Ch29_AT" createVehicle _pos
~0.05
deleteVehicle _b2
and u can use "fire1 InFlame True" just after the explosion for added effect
Arkon
-
OK, try:
Place a marker over the building you want to destroy, name the marker something.......fred maybe.
Press the Show IDs button in the editor and zoom in till you can read the ID number of the building.
Then in your script, trigger or whatever, use:
badbuilding = getMarkerPos "fred" nearestObject IDnumber;
badbuilding setdamage 1;
Works fine with a radio trigger anyway.
Planck
-
Thnx Arkon, its a fine sollution if you wish to destroy with simullated artillery, and the use of sounds and camcreate can give it more FX
Thnx Planck, Ill give it a try tonight, it should work.
-
works perfectly Planck, thank you very much. This seems the best way to destroy buildings in ArmA..
I just placed a car in front of the antenna, and a trigger activated when not alive the car... just perfect..
Thanks.
-
I found that, in OFP at least, invisible armored targets attracted lots of chopper fire. :clap:
Should work for ArmA too. That way you don't need to place an unwanted vehicle there. You just setPos the target in the middle of what you want blown up.
-
Addonless chopper attacking whatever, buildings too ;)