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

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

Post by Plaigon »

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

Re: Little question about enemy hint on screen

Post by Marth8880 »

Welcome to GT! :)

Probably not possible, sorry.

Devs likely disabled it in multiplayer because it makes spotting enemies too easy.
Plaigon
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

Post by Plaigon »

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

Re: Little question about enemy hint on screen

Post by Marth8880 »

That would place the yellow objective marker above the units' heads.
AnthonyBF2
Jedi
Jedi
Posts: 1210
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: SWBF2 PSP+PS2 Conversion
Location: San Diego

Re: Little question about enemy hint on screen

Post by AnthonyBF2 »

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.
Plaigon
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

Post by Plaigon »

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

Re: Little question about enemy hint on screen

Post by Marth8880 »

For pulse effect, see documentation here: https://github.com/marth8880/SWBF2-Lua- ... clua#L1256
Plaigon
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

Post by Plaigon »

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

Re: Little question about enemy hint on screen

Post by Marth8880 »

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)
Plaigon
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

Post by Plaigon »

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

Re: Little question about enemy hint on screen

Post by Marth8880 »

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.
AnthonyBF2
Jedi
Jedi
Posts: 1210
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: SWBF2 PSP+PS2 Conversion
Location: San Diego

Re: Little question about enemy hint on screen

Post by AnthonyBF2 »

I've tested PURPLE, PINK, and GRAY. They work.
Plaigon
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

Post by Plaigon »

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