Home   Help Search Login Register  

Author Topic: Nearest?! WORK!  (Read 1217 times)

0 Members and 4 Guests are viewing this topic.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Nearest?! WORK!
« on: 15 Mar 2005, 18:55:21 »
I did a search on this and all I could find was nearestobject, so I tried the comref to but its not in there! Every command used in OFP? HA!

So here we go, I cannot get this stupid command to do smack. Is this command used only for conditions like distance? I cant figure this stupid command out!

-thanks
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Nearest?! WORK!
« Reply #1 on: 15 Mar 2005, 18:59:56 »
It only works out to 50m or something.
Plenty of reviewed ArmA missions for you to play

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Nearest?! WORK!
« Reply #2 on: 15 Mar 2005, 19:44:15 »
I think there's a function in the ed depot that handels bigger distances. Don't quote me though.

:beat: *Gets Shot* :beat:

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Nearest?! WORK!
« Reply #3 on: 15 Mar 2005, 20:54:07 »
ok... so it only works about 50 m... I thought that was nearestobject... maybe both, but that wasnt my question, the question is how do I use it?!
like {_x say "Howdy"} nearest _listeddude player
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Nearest?! WORK!
« Reply #4 on: 15 Mar 2005, 21:09:00 »
From the comref:


nearestObject pos
Operand types:
    pos: Array
Type of returned value:
    Object
Description:
    Nearest building of given type to given position or object. pos may be [x,y,z, "type"] or [object, "type"]. Although you can give it coordinates, you have to pass an object or unit to search from. Also, this command can only find objects up to 50 meters away from the stated object.

Example:
    nearestObject [player, "StreetLamp"]

Also:

nearestBuilding obj
Operand types:
    obj: Object
Type of returned value:
    Object
Description:
    Nearest building to given object.

Example:
    neareastBuilding player


Those are the only 'nearest' commands.

Hehehe......the nearest you will get to nearest


Planck
« Last Edit: 15 Mar 2005, 21:13:18 by Planck »
I know a little about a lot, and a lot about a little.

Kyle Sarnik

  • Guest
Re:Nearest?! WORK!
« Reply #5 on: 15 Mar 2005, 21:45:35 »
I did a search on this and all I could find was nearestobject, so I tried the comref to but its not in there! Every command used in OFP? HA!

So here we go, I cannot get this stupid command to do smack. Is this command used only for conditions like distance? I cant figure this stupid command out!

-thanks

Thats because there is no "nearest" command, only nearestobject or nearestbuilding, anyways nearestobject is what you want, it will detect any type of object, be it vehicle (includes soldiers), ammo, buildings, bushes (correct me if im wrong), and maybe some others that I can't think of.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Nearest?! WORK!
« Reply #6 on: 16 Mar 2005, 00:37:59 »
Go into the game, type "ne" and nearest pops up.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Nearest?! WORK!
« Reply #7 on: 16 Mar 2005, 00:54:54 »
Go into the game, type "ne" and nearest pops up.

Interesting... it does. However, there are other examples of commands showing up like this that do not really exist. Perhaps "nearest" was intended to be a command, but was never fully implemented. That's the best I can do. If you do manage to get this "nearest" command working, please tell us how, because you will have discovered a command that has never been used before :)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Nearest?! WORK!
« Reply #8 on: 16 Mar 2005, 03:23:03 »
:( oh well.. thanks for the help, better go look up nearest object...
I like your approach, lets see your departure.
Download the New Flashlight Script!

johan_d2

  • Guest
Re:Nearest?! WORK!
« Reply #9 on: 17 Mar 2005, 00:38:56 »
Its fun to pick up any soldier of your side to join you for example:

; follow me.sqs
; get nearest soldier to join your team, if slots open, and assuming your rank


_victim = nearestobject [((getpos player select 0) + 3*(sin getDir player)), ((getpos player select 1) + 3*(cos getdir player)), getpos player select 2];
hint format ["%1",_victim," joined"]
[_victim] join pteam
exit

start with init field of player:

_follow = player addaction["Follow me","follow.sqs"]

name yourself pteam

have fun!
« Last Edit: 17 Mar 2005, 00:39:34 by johan_d2 »