Page 1 of 1

Little question about enemy hint on screen

Posted: Sun May 05, 2019 9:49 am
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!

Re: Little question about enemy hint on screen

Posted: Sun May 05, 2019 4:08 pm
by Marth8880
Welcome to GT! :)

Probably not possible, sorry.

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

Re: Little question about enemy hint on screen

Posted: Sun May 05, 2019 4:38 pm
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.

Re: Little question about enemy hint on screen

Posted: Sun May 05, 2019 5:50 pm
by Marth8880
That would place the yellow objective marker above the units' heads.

Re: Little question about enemy hint on screen

Posted: Sun May 05, 2019 9:48 pm
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.

Re: Little question about enemy hint on screen

Posted: Sat May 18, 2019 3:44 am
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!

Re: Little question about enemy hint on screen

Posted: Tue May 21, 2019 4:36 am
by Marth8880
For pulse effect, see documentation here: https://github.com/marth8880/SWBF2-Lua- ... clua#L1256

Re: Little question about enemy hint on screen

Posted: Wed May 22, 2019 12:19 pm
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.

Re: Little question about enemy hint on screen

Posted: Wed May 22, 2019 4:43 pm
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)

Re: Little question about enemy hint on screen

Posted: Wed May 22, 2019 5:45 pm
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?

Re: Little question about enemy hint on screen

Posted: Wed May 22, 2019 6:40 pm
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.

Re: Little question about enemy hint on screen

Posted: Wed May 22, 2019 6:58 pm
by AnthonyBF2
I've tested PURPLE, PINK, and GRAY. They work.

Re: Little question about enemy hint on screen

Posted: Thu May 23, 2019 2:46 pm
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?