Home   Help Search Login Register  

Author Topic: IDs  (Read 1795 times)

0 Members and 1 Guest are viewing this topic.

Offline snozzdog

  • Members
  • *
IDs
« on: 17 Jul 2008, 11:42:04 »
How do i get a unit, say called 'tank' to destroy a bridge or a building using the buildings ID? say for example the ID is 222

Cheers.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: IDs
« Reply #1 on: 17 Jul 2008, 16:04:16 »
Code: [Select]
tank doTarget (position tank nearestObject 222); tank doFire (position tank nearestObject 222)Note that the tank usually attacks buildings with it's MG...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline snozzdog

  • Members
  • *
Re: IDs
« Reply #2 on: 17 Jul 2008, 16:08:08 »
Ahh it didnt work, i tried it on a bridge with a Harrier, a building with an M1A1 and another Building with a Humvee

The plane wouldnt even go near the bridge let alone shoot it.

The tank shot about 4 rounds at it with its MG the first time i tried it then for some reason every time after i tried without changing anything it didnt budge and just sat there

And with the Humvee it just aimed at it, and they just sat their aiming at it but not shooting

Please help.



Ideally im looking for a Harrier to some in on Radio Alpha (i can do that bit) and then take out a bridge which code is 161998

Help pleeease it annoying the crap out of me
« Last Edit: 17 Jul 2008, 19:26:13 by snozzdog »

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: IDs
« Reply #3 on: 17 Jul 2008, 20:27:18 »
Snozzdog,

Try this,

tank doTarget (position tank nearestObject 222); tank fire "M256";
Harrier doTarget (position harrier nearestObject 222); harrier fire "BombLauncher";

Here's YOUR reply, as always.

Luke
« Last Edit: 17 Jul 2008, 20:29:29 by Luke »
Pesky Human!!
Wort Wort Wort.

Offline snozzdog

  • Members
  • *
Re: IDs
« Reply #4 on: 18 Jul 2008, 10:11:20 »
This one was a bit better but still didnt work, this time the moment the game started the Harriers bomb dropped. So if i placed it well at the start of the mission the default bomb drop would hit the bridge. But it'd be all done in the first 5 seconds i need it to be on a radio command really and actually be designated to hit the bridge (ID: 607089)

So it swoops inand takes it out.

I could try it setting a waypoint for a bomb to drop then call it to that waypoint by radio, but the thing is a single bomb does destroy the bridge, it'll have to be multiple runs.

Cheers

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: IDs
« Reply #5 on: 18 Jul 2008, 10:33:56 »
In this thread: http://www.ofpec.com/forum/index.php?topic=29944.0 Mando made some kind of script that has a chopper attack any building (no addons needed) : I'm pretty sure it should be editable to use tanks/harriers/whatever instead. :D

Otherwise, I'd almost suggest using one of the many airstrike scripts around, since even if you did manage to get the harrier to drop its load, it might not hit - unless you've got a LD someplace around, I think.

Also: I don't know if the object-IDs work in ArmA anymore. Better luck with the near(est)Object(s) line of commands. Check them out!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: IDs
« Reply #6 on: 18 Jul 2008, 12:03:36 »
Quote
I don't know if the object-IDs work in ArmA anymore.
Yes they do, it's the command object that doesn't.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Barbolani

  • Members
  • *
Re: IDs
« Reply #7 on: 18 Jul 2008, 14:27:30 »
Hi, AFAIK Mando Missile is the best way to make a Harrier attack any building.... If you are able to know how it works  ;)

Offline snozzdog

  • Members
  • *
Re: IDs
« Reply #8 on: 18 Jul 2008, 16:22:40 »
Ooo all sounds good, i'll try them all out and see what happens

Offline danturn

  • Members
  • *
Re: IDs
« Reply #9 on: 19 Jul 2008, 01:15:13 »
You could always just simulate it by having the plane fly over but not necissarily drop the bomb, by creating the waypoint set to move on your alpha radio and then a trigger over the building you want bombed with the following in the condition field,

Code: [Select]
harrier in thislist
and in the on activation field i believe it is something along the lines of

Code: [Select]
harrierbomb = "Bo_GBU12_LGB" createvehicle (getpost triggername)
this wont force the harrier to drop its bomb, but will simulate the bomb landing on the target, if you wish to be able to see the bomb drop, use

Code: [Select]
harrierbomb = "Bo_GBU12_LGB" createvehicle [getpos trigger select 0, getpost trigger select 1, 100]
100 is equal to the height the bomb drops from so can be changed to look like it drops from the harrier.

Offline Knight Trane

  • Members
  • *
Re: IDs
« Reply #10 on: 19 Jul 2008, 21:39:18 »
Yes they do, it's the command object that doesn't.

  Then what command do you use to get the desired result?

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: IDs
« Reply #11 on: 20 Jul 2008, 08:25:19 »
KT,

The answer to that can be found here

So,
Code: [Select]
getPos player nearestobject 607089
would find the object (bridge, house, building, etc.).

Here's YOUR reply, as always.

Luke
Pesky Human!!
Wort Wort Wort.

Offline Knight Trane

  • Members
  • *
Re: IDs
« Reply #12 on: 20 Jul 2008, 16:34:19 »
Thanks