Little question about enemy hint on screen

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

Recruit Womprat Killer
Posts: 12
Joined: Fri Dec 14, 2018 6:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Little question about enemy hint on screen

Postby Plaigon » Sun May 05, 2019 9:49 am

Hi guys,
i was wondering these days how i could enable the enemy red circles over them on multiplayer. I have searched all over lua and odf files of modtools, with keywords "hud_target_hint_onscreen" and nothing of interesting. Maybe some of you have more information of this feature and why dev team removed it from online? Anyway thanks in advance!

Resistance Leader
User avatar
Posts: 5261
Joined: Tue Feb 09, 2010 8:43 pm
Location: Edinburgh, UK
Projects :: EVERYWHERE + Project Infiltrator
Games I'm Playing :: Max Payne 3
xbox live or psn: Marth8880

Re: Little question about enemy hint on screen

Postby Marth8880 » Sun May 05, 2019 4:08 pm

Welcome to GT! :)

Probably not possible, sorry.

Devs likely disabled it in multiplayer because it makes spotting enemies too easy.

Recruit Womprat Killer
Posts: 12
Joined: Fri Dec 14, 2018 6:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Little question about enemy hint on screen

Postby Plaigon » Sun May 05, 2019 4:38 pm

Do you think adding these kind of code in the corresponding lua file would force them to appear?
MapAddClassMarker("jed_knight_04", "hud_objective_icon", 3.5, ATT, "YELLOW", true)

After replacing by the corresponding parameters obviously.

Resistance Leader
User avatar
Posts: 5261
Joined: Tue Feb 09, 2010 8:43 pm
Location: Edinburgh, UK
Projects :: EVERYWHERE + Project Infiltrator
Games I'm Playing :: Max Payne 3
xbox live or psn: Marth8880

Re: Little question about enemy hint on screen

Postby Marth8880 » Sun May 05, 2019 5:50 pm

That would place the yellow objective marker above the units' heads.

Jedi
User avatar
Posts: 1188
Joined: Wed Aug 21, 2013 3:55 pm
Location: San Diego
Projects :: SWBF2 PSP+PS2 Conversion

Re: Little question about enemy hint on screen

Postby AnthonyBF2 » Sun May 05, 2019 9:48 pm

Do you think adding these kind of code in the corresponding lua file would force them to appear?
MapAddClassMarker("jed_knight_04", "hud_objective_icon", 3.5, ATT, "YELLOW", true)


I tried to accomplish the exact same thing and it was half-functional, sometimes it worked, sometimes it didn't, it depended on what character class, map, server I am on, etc.
Long story short I just gave up on that.

Recruit Womprat Killer
Posts: 12
Joined: Fri Dec 14, 2018 6:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Little question about enemy hint on screen

Postby Plaigon » Sat May 18, 2019 3:44 am

Do you remember some codes about that please?
Do you guys know how to remove the pulse effect of the big yellow objective arrows? The kind of blinky effect if you know what I mean? Thanks in advance!

Resistance Leader
User avatar
Posts: 5261
Joined: Tue Feb 09, 2010 8:43 pm
Location: Edinburgh, UK
Projects :: EVERYWHERE + Project Infiltrator
Games I'm Playing :: Max Payne 3
xbox live or psn: Marth8880

Re: Little question about enemy hint on screen

Postby Marth8880 » Tue May 21, 2019 4:36 am

For pulse effect, see documentation here: https://github.com/marth8880/SWBF2-Lua- ... clua#L1256

Recruit Womprat Killer
Posts: 12
Joined: Fri Dec 14, 2018 6:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Little question about enemy hint on screen

Postby Plaigon » Wed May 22, 2019 12:19 pm

Thanks Marth, the pulse effect has been removed. Do you know the meaning of the other optional parameters, like the fourth bool after color parameter, I saw it used somewhere.

Resistance Leader
User avatar
Posts: 5261
Joined: Tue Feb 09, 2010 8:43 pm
Location: Edinburgh, UK
Projects :: EVERYWHERE + Project Infiltrator
Games I'm Playing :: Max Payne 3
xbox live or psn: Marth8880

Re: Little question about enemy hint on screen

Postby Marth8880 » Wed May 22, 2019 4:43 pm

These are all of the known working parameters that it can take:
Code: Select all
-- @param #string class         Name of entity class to attach markers to (example: `"imp_inf_trooper"`)
-- @param #string markerClass   Name of marker icon texture to use (the only value that seems to work is `"hud_objective_icon"`)
-- @param #float size         Icon size multiplier
-- @param #int teamIndex      Index of team that should be able to see the marker
-- @param #string color         Icon color. Possible values: 
--                          `RED` 
--                          `GREEN` 
--                          `BLUE` 
--                          `CYAN` 
--                          `MAGENTA` 
--                          `YELLOW` 
--                          `ORANGE` 
--                          `WHITE` 
--                          `BLACK` 
-- @param #bool showOnHUD      Optional argument. Set to true to also show the marker on the player's HUD, or false to only show it on the map (default = true)
-- @param #bool pulseOpacity   Optional argument. Set to true to linearly interpolate marker opacity from `(alpha*1.0)` to `(alpha*0.0)`
--                          once per second, or false to keep opacity static (default = true)
-- @param #bool pulseSize      Optional argument. Set to true to linearly interpolate marker size from `(size*0.5)` to `(size*1.5)` once
--                          per second, or false to keep size static (default = true)

Recruit Womprat Killer
Posts: 12
Joined: Fri Dec 14, 2018 6:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Little question about enemy hint on screen

Postby Plaigon » Wed May 22, 2019 5:45 pm

Okay thanks, I thought you knew something about the fourth bool but never mind.
Do you know how to get a reference to the local player anywhere? I mean i'm trying to get our team in ObjectiveConquest.lua, but I don't see any way to do that. Doe self refer to the player in ObjectiveConquest script?

Resistance Leader
User avatar
Posts: 5261
Joined: Tue Feb 09, 2010 8:43 pm
Location: Edinburgh, UK
Projects :: EVERYWHERE + Project Infiltrator
Games I'm Playing :: Max Payne 3
xbox live or psn: Marth8880

Re: Little question about enemy hint on screen

Postby Marth8880 » Wed May 22, 2019 6:40 pm

self refers to the script's object. What about the player are you trying to get? You can usually just use GetCharacterUnit(0) with other functions like GetEntityPtr etc.

Jedi
User avatar
Posts: 1188
Joined: Wed Aug 21, 2013 3:55 pm
Location: San Diego
Projects :: SWBF2 PSP+PS2 Conversion

Re: Little question about enemy hint on screen

Postby AnthonyBF2 » Wed May 22, 2019 6:58 pm

I've tested PURPLE, PINK, and GRAY. They work.

Recruit Womprat Killer
Posts: 12
Joined: Fri Dec 14, 2018 6:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Little question about enemy hint on screen

Postby Plaigon » Thu May 23, 2019 2:46 pm

AnthonyBF2 wrote:I've tested PURPLE, PINK, and GRAY. They work.

How have you done for these 3 colors? I tried them with the basic mod tools and they appear in black in my game. Maybe you've got the 1.3 patch that allow them nah?

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 4 guests