• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Show custom minimap icon

Status
Not open for further replies.
Level 13
Joined
Mar 19, 2010
Messages
870
Hi hivers,

one question:

2 Teams... on both teams are teleporter i want to give a special icon on the minimap BUT i dont want that both team can see the other teams teleporter icons on the minimap. Every team can only see their own teleporter + icons on the minimap.

You know what i mean?

Reg.
 
I guess this is not possible, as there are not functions that allow creating minimap icons.

What you can possibly do is creating a dummy unit with no model that creates an icon (shop? Hero?) and make it invisible for the other player.
Then you can change the image for that icon via imports and interface customization.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
There are different ways to fiddle with minimap icons.

First, you can either in "Advanced -> Game Interface..." or via the Import Editor (by setting the custom path to one of the default icons) override a default icon with your own. You can put quite any .blp in there, as the game does some internal conversion to scale them. Mind that this process overrides the icon for ALL entities of one kind ( unit, hero, goldmine, etc..).

The second method offers more customization, it can change the minimap icon of a single unit. So far I was only able to use 16x16 blp/tga images with this method.
JASS:
call SetAltMinimapIcon("war3mapImported\\customIcon.blp")
call UnitSetUsesAltIcon(unit, true)

If you want to change the icon only for a special player, wrap it in a GetLocalPlayer block
JASS:
call SetAltMinimapIcon("war3mapImported\\customIcon.blp")
if(GetLocalPlayer()==Player(0)) then
call UnitSetUsesAltIcon(unit, true)
endif
Im quite sure this does not desync, a fast test and common logic tell me so.
 
Level 13
Joined
Mar 19, 2010
Messages
870
ok, but as i mentioned, there are 2 teams fighting against each other.

on both sides are teleporter the players can use. How to change the icon i know now BUT how can hide the icon for the other team? I don't want that a team can see the other teleporter icons.
 
Level 13
Joined
Mar 19, 2010
Messages
870
Well, i tried it but i have problems with saving the correct 16x16 file. I created a 16x16 transparent file, a 16x16x with black bg color. saved it as tga, then converted to blp BUT for the transparent file i get a white icon and for the black one i get a black icon...

How should i save the file? I'm using Photoshop CS6
 
Level 13
Joined
Mar 19, 2010
Messages
870
Thank you :)

It works but can you help me with 2 things.

First, check the testmap... and tell me pls why it does not work... i mean

Player 1: Should see his own special icon AND NOT the icon of Player 2
Player 2: Should see his own special icon AND NOT the icon of Player 1

Second: Can you create a icon for me? It should look like this one:

models_6289_screenshot.jpg


You can make it easy as possible... 16x16 dont let mass details ^^ - so 1-2 circles are ok.
 

Attachments

  • Teleporter.w3x
    19.1 KB · Views: 149
Level 12
Joined
Mar 13, 2012
Messages
1,121
awww bad news pred1980. It seems I overestimated the SetAltMinimapIcon function. You can only set one alternative minimap icon, which greatly reduces its usefulness. For every unit you can then decide whether to use that alternative minimap icon or not..
You can however at every time change that one alternative icon..

So I would advise you to use the former posted method 1. Go to Advanced -> Game Interface... and search for an icon you dont use and set your desired icon. Also you can open the MPQs and look in UI\MiniMap\, most of the icons in there are used somewhere. This method also allows bigger icons.
Then you have to hide the minimap display in object editor of the real unit and create a dummy unit/destructible with the modified icon at the place of the real unit. Another problem then is to somehow hide that dummy unit minimap icon from one player and show it to another. This might be done by e.g. invisibility (which is bad if some kind of gem of truesight exists as it will uncover the unit and its icon on the minimap) or hiding the unit/destructible(which is very prone to desyncs if you dont do it right, but thats again another whole topic). Srry I can not give you more accurate advise but this is a complex thing to get it all right and it burns my time like hell.

If you still need it, here an ugly 16x16 Circle
 

Attachments

  • Circle.blp
    3 KB · Views: 175
Status
Not open for further replies.
Top