Home   Help Search Login Register  

Author Topic: attachObject  (Read 2158 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
attachObject
« on: 22 Jan 2009, 05:42:50 »
Hi all, with the use of the attachobject command, it says attatches a location to a specified object.

What does this mean. When I think of location I'm thinking of a place on the island or something, but are they talking about a variable or something?

If that's the case, how is this command used in the game and such? thanks all.
Who's hyped for Arma4, long live Arma!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: attachObject
« Reply #1 on: 22 Jan 2009, 09:45:41 »
There seems to be a slip-up in the ComRef, attachObject is ArmA-only function..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: attachObject
« Reply #2 on: 22 Jan 2009, 12:52:11 »
Nonetheless, the question is quite interesting (and so would be possible answers). Would you mind moving this thread to the corresponding ArmA section? TIA!


And while we're at it:

- What are locations good for? Which problem are they meant to solve? Or are they simply another form of local markers with metadata?
- Why do they have an importance and what might it be used for?
- Is anyone aware of a mission that makes use of locations so far?
- Wouldn't it be possible to create map-independent missions by using locations to find villages, towns, cities and other interesting places (e.g. to position camps and depots in Warfare dynamically)?





try { return true; } finally { return false; }

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: attachObject
« Reply #3 on: 22 Jan 2009, 15:38:33 »
Locations are the things you see on the game map, like, town names, viewpoints, village names, place names, etc etc.

See command createLocation for more detail.


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

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: attachObject
« Reply #4 on: 22 Jan 2009, 16:11:28 »
Thank you guys, that helped for me to undersand what a location is regarding the attachobject command. yes can someone please move this to the ArmA place. I didn't realize it was only for ArmA, which I don't have and can't use it   :(....ah that's alright. Better that I learned what it was though.. :)...

Hey quick question though, when you use the;

[classname, position, sizeX, SizeY] array

In the position part, is that the exact position on the map they are talking about, because it has a bunch of numbers? Or can it be a MAP ID or something else, i'm not clear on the numbers? Thank you. And then would you use this code in some kind of script or would you use it in a command line in the mission editor?  Looks like an external code..
Who's hyped for Arma4, long live Arma!

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: attachObject
« Reply #5 on: 22 Jan 2009, 16:29:05 »
Yes, the array indicates the position on the map (using three coordinates: longitude, latitude and height). And no, you can't use an ID here.

The code on the createLocation site can be used in both, script and editor (except for the local variable which the editor will complain about).

Uhm, what do you mean by "external code"?
« Last Edit: 22 Jan 2009, 16:37:48 by Worldeater »
try { return true; } finally { return false; }

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: attachObject
« Reply #6 on: 22 Jan 2009, 16:39:24 »
 :),w hat I mean by "external code" or "external scripting" is the use of commands and codes outside the game and editor..An .sqs file basically   
Who's hyped for Arma4, long live Arma!

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: attachObject
« Reply #7 on: 22 Jan 2009, 16:58:40 »
Doh! Got it! :D
try { return true; } finally { return false; }

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: attachObject
« Reply #8 on: 22 Jan 2009, 18:37:22 »
SPON HoloMap uses the location and sizes of villages, cities and capitals in order to show grey circles on the rendered 3D map where those urban areas are. You can see it clearly on the big screenshot of Sahrani (quadrants.jpg).

Also findClosestTown and, I think, GNV Civilans use locations.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: attachObject
« Reply #9 on: 22 Jan 2009, 19:57:50 »
Nice, thanks Spooner! I'll have a look at them. Meanwhile I found out about the...

importance - decides, which icon is drawn when there are several overlapping icons in one place

try { return true; } finally { return false; }