Home   Help Search Login Register  

Author Topic: Creating a custom location  (Read 3282 times)

0 Members and 1 Guest are viewing this topic.

Offline Deadfast

  • Members
  • *
Creating a custom location
« on: 24 Jun 2009, 17:22:27 »
Hello guys,
got a little problem with creating a custom location in ARMA 2.

Code: [Select]
loc1 = createLocation ["NameLocal", getPos player, 50, 50];
loc1 setName "Testing location";
loc1 setDirection 0;
loc1 setImportance 1;
The above doesn't work (no error, but no location appears).


Thanks in advance :)

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Creating a custom location
« Reply #1 on: 24 Jun 2009, 18:55:00 »
The above doesn't work (no error, but no location appears).

Just out of curiosity: How do you check if there's a locatiopn or not? I thought they were like gamelogics - invisible.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Deadfast

  • Members
  • *
Re: Creating a custom location
« Reply #2 on: 25 Jun 2009, 00:48:57 »
Well, the whole point is I want them to appear on the map, which is also one of their main purposes. ;)
They do not :(

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Creating a custom location
« Reply #3 on: 25 Jun 2009, 06:14:10 »
Have you tried using setType to give it a "graphic" as well? Since you don't seem to specify that anywhere else in the code...note I've never scripted with locations so I don't know - just an idea!

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

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Creating a custom location
« Reply #4 on: 25 Jun 2009, 12:03:58 »
I also suspect that you must give them a physical/graphical shape in order to see them. That's why I asked if you were absolutely certain that they are not there, even if you can't see them. Unfortunately I don't know what command to use either. I have only som vague references from the Biki and BI Forums concerning Locations. Please share what you find.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Deadfast

  • Members
  • *
Re: Creating a custom location
« Reply #5 on: 25 Jun 2009, 15:21:13 »
Tried the setType Wolf recommended, but the location still did not show on the map.

The location object itself exists though (typeName returns LOCATION).

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Creating a custom location
« Reply #6 on: 25 Jun 2009, 15:40:43 »
The location object itself exists though (typeName returns LOCATION).

Quick fix: Create a marker with the desired text and setMarkerPos it at the position you getPos from the gamelogic. The marker has a physical shape that can be seen on the map.

As a sidenote, I suspect that LOCATION logics have other uses. Namely when you define areas to be avoided or selected by the functions conmtained in the ALICE and Artillery Modules that can be found in the editor (F7). But this is mere speculation on my behalf.
« Last Edit: 25 Jun 2009, 15:44:12 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!