Page 1 of 1

Adding yellow arrows to conquest map [Solved]

Posted: Sat Jun 06, 2015 2:20 pm
by Lorul1
the title says it all , how do I add the yellow campaign arrows to my conquest map.

Re: Adding yellow arrows to conquest map.

Posted: Sat Jun 06, 2015 3:02 pm
by Noobasaurus

Code: Select all

MapAddRegionMarker(region, markerclass, number, number, team, color, boolean, boolean, boolean, boolean);
MapRemoveRegionMarker(region);
MapAddEntityMarker(objectname, markerclass, number, number, team, color, boolean, boolean, boolean, boolean);
MapRemoveEntityMarker(objectname);
MapAddClassMarker(class, markerclass, number, number, team, color, boolean, boolean, boolean, boolean);
MapRemoveClassMarker(class);
You'll use one or more of these depending on what you want to do with them.

Re: Adding yellow arrows to conquest map.

Posted: Sun Jun 07, 2015 7:10 pm
by Lorul1
I don't think I'm doing this right

here's my lua :

Code: Select all

Once = OnFinishCapture(
   function(post, holding) 
      if GetCommandPostTeam("cp3") == 1 then
         SetProperty("cp3", "CaptureRegion", "xxx")
	 MapAddEntityMarker("cp3", "hud_objective_icon", 4.0, ATT, "YELLOW", true)
	 MapAddEntityMarker("arrow", "hud_objective_icon", 4.0, ATT, "YELLOW", true)
      end
   end
)
I took that from the geonosis campaign script.
cp3 is my command post that I want an arrow to point to
and
arrow is a region I want the arrow to point to

Re: Adding yellow arrows to conquest map.

Posted: Sun Jun 07, 2015 7:38 pm
by Noobasaurus
What does the error log say?

Re: Adding yellow arrows to conquest map.

Posted: Sun Jun 07, 2015 8:39 pm
by [RDH]Zerted
At the least you need to use MapAddRegionMarker() for the region. Have you tried switching teams ingame just to make sure the arrow isn't showing up for the other team?

Re: Adding yellow arrows to conquest map.

Posted: Mon Jun 08, 2015 7:40 pm
by Lorul1
Fixed it :D

I had to have this before it

Code: Select all

    --  REP Attacking (attacker is always #1)
    REP = 1
    CIS = 2
    --  These variables do not change
    ATT = 1
    DEF = 2
in geonosis they have this near the end

Code: Select all

    --  REP Attacking (attacker is always #1)
    local REP = 1
    local CIS = 2
    --  These variables do not change
    local ATT = 1
    local DEF = 2
but most scripts have the first code at the top

Re: Adding yellow arrows to conquest map.

Posted: Tue Jun 09, 2015 4:43 am
by Marth8880
Noobasaurus wrote:

Code: Select all

MapAddRegionMarker(region, markerclass, number, number, team, color, boolean, boolean, boolean, boolean);
MapRemoveRegionMarker(region);
MapAddEntityMarker(objectname, markerclass, number, number, team, color, boolean, boolean, boolean, boolean);
MapRemoveEntityMarker(objectname);
MapAddClassMarker(class, markerclass, number, number, team, color, boolean, boolean, boolean, boolean);
MapRemoveClassMarker(class);
You'll use one or more of these depending on what you want to do with them.
Semi-off-topic: Ugh. Do we know what all those bools do, yet?

Re: Adding yellow arrows to conquest map [Solved]

Posted: Tue Jun 09, 2015 4:57 am
by Locutus
It's been a while since I used them but I think the first had something to do if the marker could be attached to a movable object respectively if it would move along. The second or third one decided whether the marker would have an animation on the minimap or just stay static.