Home   Help Search Login Register  

Author Topic: Marker orientation/direction  (Read 1293 times)

0 Members and 1 Guest are viewing this topic.

Offline Trexian

  • Members
  • *
Marker orientation/direction
« on: 18 Jun 2008, 05:56:13 »
Hello - it has been awhile. :)

Is there some (easy) way to determine the orientation of a marker.  The ultimate idea would be this:
- mission creator creates a marker on the map and names it;
- the name of the marker is passed to a script, which creates a trigger with the same dimensions as the marker;
- when activated, the trigger generates a list of all units within the marker/trigger.

I have searched, but haven't found anything quite what I need.

My situation would also be solved if there's a way to have a trigger display the exact boundaries like a marker does.

The only "solution" I've been able to work out is to take the marker dimensions, create temporary hidden markers on the corners (the marker would first be checked to make sure it is a rectangle), then work out the relative directions and distances of the corners to deduce an angle to use in the create trigger part.

There's an easier way, right? :)

Right?
Sic semper tyrannosauro.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Marker orientation/direction
« Reply #1 on: 18 Jun 2008, 13:16:07 »
Your overall idea seems sensible and I was going to say, "just use getMarkerDir", but then I found out that there wasn't one! That is rather surprising to me.

I can't see that there is a way to determine the orientation of a marker though, in the way you've described, since you only know where the corners of the marker actually are if you know its orientation already.

There aren't any trigger querying commands, so I can't suggest you ask the mission-maker to place a named trigger on the map leaving you to make the marker.

You might just be better off asking the player to place the trigger and marker manually. Sorry!
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Marker orientation/direction
« Reply #2 on: 18 Jun 2008, 13:22:56 »
What about markerDir command ?  :P

Syntax: Degrees = markerDir "markerName";

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Marker orientation/direction
« Reply #3 on: 18 Jun 2008, 13:29:47 »
Good point! :whistle: Nothing like BIS's inconsistent command naming for confusing us mortals (getMarkerType, getMarkerSize, getMarkerColor, getMarkerPos...but markerDir).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Marker orientation/direction
« Reply #4 on: 18 Jun 2008, 13:31:22 »
    :D   :cool2:

There are many other commands beginning with marker*, they are mostly complimentary to any setmarker* commands listed later, or even equivalent to any getmarker* commands.


Planck
« Last Edit: 18 Jun 2008, 13:38:06 by Planck »
I know a little about a lot, and a lot about a little.

Offline Trexian

  • Members
  • *
Re: Marker orientation/direction
« Reply #5 on: 18 Jun 2008, 14:50:39 »
BAH!  :D

Thanks guys.  :clap:

I looked at all the "get" and "set" stuff. :) Silly me....  :whistle:

Glad it was an easy answer!

A follow up question, though. ;)

It returns a number, which I presume to be 1-360?  That number directly correlates to the angle value in setTriggerArea?

Won't be able to test it for a couple days, so trying to work it out in my head now.
Sic semper tyrannosauro.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Marker orientation/direction
« Reply #6 on: 18 Jun 2008, 15:17:04 »
Returns a number (real number), which can also include a decimal portion.


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

Offline Trexian

  • Members
  • *
Re: Marker orientation/direction
« Reply #7 on: 19 Jun 2008, 03:27:09 »
BTW, I now realize that the whole thing might've been an exercise in futility.  Tonight when I went into the editor, the test mission was exactly the same, but the trigger was a nice, finely drawn, box.  Not the icon I recall seeing when I last looked at it.

:doh:

So, I don't think I need this nice little script I just worked up.  Although, as these things usually happen, I'll end up needing it eventually for something else. :D
Sic semper tyrannosauro.