Adding yellow arrows to conquest map [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Adding yellow arrows to conquest map [Solved]

Post by Lorul1 »

the title says it all , how do I add the yellow campaign arrows to my conquest map.
Last edited by Lorul1 on Mon Jun 08, 2015 7:42 pm, edited 1 time in total.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Adding yellow arrows to conquest map.

Post 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.
User avatar
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Re: Adding yellow arrows to conquest map.

Post 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
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Adding yellow arrows to conquest map.

Post by Noobasaurus »

What does the error log say?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Adding yellow arrows to conquest map.

Post 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?
User avatar
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Re: Adding yellow arrows to conquest map.

Post 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
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Adding yellow arrows to conquest map.

Post 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?
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Adding yellow arrows to conquest map [Solved]

Post 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.
Post Reply