• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Minimap Icon won't show

Status
Not open for further replies.

Antares

Spell Reviewer
Level 35
Joined
Dec 13, 2009
Messages
1,106
Hello,

I don't know what I'm doing wrong. I'm trying to display an icon on the minimap with:

JASS:
set newPowerup.indicator = CreateMinimapIcon( x , y , 255 , 255 , 255 , "Minimap01.blp" , FOG_OF_WAR_VISIBLE )
call SetMinimapIconVisible( newPowerup.indicator , true )

The icon is 16x16. It has a 1 pixel transparent border. I've tried blp1, blp2, dds, and tga. None of them work. What's wrong with this icon?
 

Attachments

  • Minimap01.png
    Minimap01.png
    785 bytes · Views: 62
Last edited:
I've decided that I'm not dealing with this crap and I'm just gonna use frames instead. For anyone googling this in the future, here is some code to correctly position the icon on the minimap:

JASS:
globals
       constant real CAMERA_BOUND_RIGHT = ?
       constant real CAMERA_BOUND_LEFT = ?
       constant real CAMERA_BOUND_TOP = ?
       constant real CAMERA_BOUND_BOTTOM = ?
endglobals

function CreateIconOnMinimap takes real x, real y, string whichIcon returns framehandle
        local real xR
        local real yR
        local real maxMinimapDist = RMaxBJ(CAMERA_BOUND_RIGHT - CAMERA_BOUND_LEFT + 768 , CAMERA_BOUND_TOP - CAMERA_BOUND_BOTTOM + 512)/2
        local real xCenter = (CAMERA_BOUND_RIGHT + CAMERA_BOUND_LEFT)/2
        local real yCenter = (CAMERA_BOUND_TOP + CAMERA_BOUND_BOTTOM)/2
        local frame iconFrame = BlzCreateFrameByType("BACKDROP", "whateverName" , BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), "", 0)
     
        set xR = (x - xCenter)/maxMinimapDist
        set yR = (y - yCenter)/maxMinimapDist

        call BlzFrameSetSize(iconFrame , 0.0083, 0.0083)
        call BlzFrameSetAbsPoint( iconFrame , FRAMEPOINT_CENTER , 0.080 + 0.067*xR , 0.077 + 0.069*yR )
        call BlzFrameSetTexture( iconFrame , whichIcon , 0 , true )
        call BlzFrameSetVisible( iconFrame , true )
        call BlzFrameSetEnable( iconFrame , false )
        return iconFrame
endfunction
 
Last edited:
Status
Not open for further replies.
Back
Top