Home   Help Search Login Register  

Author Topic: OFP Proximity stuff  (Read 1285 times)

0 Members and 1 Guest are viewing this topic.

modderman

  • Guest
OFP Proximity stuff
« on: 26 May 2005, 00:15:06 »
I was wondering what i would put in a trigger so that only land vehicles activated, and if there was a way for air vehicles to only activate it.
I was also having trouble with the nearestobj command...
how would i make it so that it detects planes.....
and can i use the nearestobj for, say a distance of 400?

_obj = nearestobject [player, "plane"] ????

Im looking to make a script, where if any plane gets with in like 400m of my plane, it activates somthing.....

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:OFP Proximity stuff
« Reply #1 on: 26 May 2005, 00:17:16 »
I think the nearestobject command only works to a maximum of 50 metres.


Planck
I know a little about a lot, and a lot about a little.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:OFP Proximity stuff
« Reply #2 on: 26 May 2005, 00:18:33 »
I believe nearestObject only works out to about 50m.

For triggers to be activated by land you need something like

Condition:   this and (thislist countType "land" > 0)

Syntax VERY not guaranteed.
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:OFP Proximity stuff
« Reply #3 on: 26 May 2005, 09:45:01 »
That is correct, nearestObject has a range of 50 meters...
You can write script that makes multiple nearestObject searches so that you can cover a much larger area though...
You can actually search through a whole island with nearestObject, it just takes time and a lot of resources...

As for maccas syntax, almost:
this && "Air" countType thisList > 0
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Grendel

  • Guest
Re:OFP Proximity stuff
« Reply #4 on: 26 May 2005, 18:41:02 »
I made a trigger for this in my SimFlak AI script...

If I remember correctly it needed Vit's APC pack to run the mission, but if all you need is the trigger you could yank it out pretty easily...

Heres my SimFlak AI script:

http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=16660;start=30

-Grendel

Offline MachoMan

  • Honoured
  • Former Staff
  • ****
  • KISS, Keep it Simple Stupid
Re:OFP Proximity stuff
« Reply #5 on: 27 May 2005, 08:58:39 »
Yep, just use a trigger, you can move it around with the unit using setPos/getPos.
Get those missions out there you morons!

Lean Bear

  • Guest
Re:OFP Proximity stuff
« Reply #6 on: 27 May 2005, 09:12:40 »
Whilst on the topic of nearestObject and typeOf: is there a way to find the "type" of things like rocks and trees? So, you could do, say:

_rock = nearestObject [player, "rock"] ?

Offline MachoMan

  • Honoured
  • Former Staff
  • ****
  • KISS, Keep it Simple Stupid
Re:OFP Proximity stuff
« Reply #7 on: 27 May 2005, 13:39:23 »
I dont think so, it has to be an object in CfgVehicles as far as I know, but u can always try it using the hint command.
Get those missions out there you morons!

Lean Bear

  • Guest
Re:OFP Proximity stuff
« Reply #8 on: 27 May 2005, 14:37:02 »
Yeah, I tried that already. It just came up with a long load string and that's about it.

So I wouldn't be able to select the nearest rock? Perhaps through a different command?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:OFP Proximity stuff
« Reply #9 on: 27 May 2005, 14:59:20 »
Here's a thread about detecting those non-configged objects (trees,bushes and rocks are not even mentioned in the game's config...)
http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=22708

There's also a link to a workaround for this problem, which is using the objects height value to determine what kind of object it is...
Despite of my 'ballsy' statement of "few lines ougta do it" it's not like that at all probably... ::)
All depends on how many different sizes of rocks there are in OFP...

(edit: added some crap)
« Last Edit: 27 May 2005, 15:04:05 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Lean Bear

  • Guest
Re:OFP Proximity stuff
« Reply #10 on: 27 May 2005, 15:02:36 »
Cool, thanks a lot :)

edit

btw Did you ever manage to do it?
« Last Edit: 27 May 2005, 15:08:07 by Lean Bear »