This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I've create a movable minimap dialogitem which can move following a unit. here's the code:
ui_minimap TriggerAddEventTimePeriodic(0.1,c_timeGame) PickEachInteger(1,player_count) actions SetVariable(pos_minimap[player_num[(IntLoopCurrent())]],(world_to_ui((UnitGetPosition(unit[player_num[(IntLoopCurrent())]])),minimap_length))) DialogControlSetPosition(component_minimap,(PlayerGroupSingle(player_num[(IntLoopCurrent())])),c_anchorTopLeft,(FixedToInt((PointGetX(pos_minimap[player_num[(IntLoopCurrent())]])))),(FixedToInt((PointGetY(pos_minimap[player_num[(IntLoopCurrent())]])))))
ui_minimap SetVariable(minimap_length,2560.0) DialogControlCreateFromTemplate(dlg_minimap,c_triggerControlTypePanel,MinimapPanel/MinimapPanelTemplate) SetVariable(component_minimap,(DialogControlLastCreated())) DialogControlSetSize(component_minimap,(PlayerGroupAll()),(FixedToInt(minimap_length)),(FixedToInt(minimap_length))) CreateDialogItemImage(dlg_minimap,320,320,c_anchorTopLeft,0,0,Param/Value/217A01B0,minimap.dds,c_triggerImageTypeNormal,true,Color(100,100,100),c_triggerBlendModeNormal) TriggerEnable(ui_minimap,true)
world_to_ui return:point references: pos_world = null <point> length = 0.0 <fixed> pos = null <point> SetVariable(pos,(Point((ArithmeticReal((ArithmeticReal((PointGetX(pos_world)),*,(ArithmeticReal(length,/,-256.0)))),+,160.0)),(ArithmeticReal((ArithmeticReal((PointGetY(pos_world)),*,(ArithmeticReal(length,/,256.0)))),+,(ArithmeticReal(160.0,-,length))))))) Return(pos)
set_game_ui HideGameUI(false,(PlayerGroupAll())) UISetFrameVisible((PlayerGroupAll()),c_syncFrameTypeMinimapPanel,true) DialogCreate(320,320,c_anchorTopRight,20,20,false) SetVariable(dlg_minimap,(DialogLastCreated())) DialogSetImageVisible(dlg_minimap,false) DialogSetVisible((DialogLastCreated()),(PlayerGroupAll()),true) ui_minimap()
i want to make this minimap round, and hide four cornors. however, only static minimap can be made round in my ability. can you give me some suggestions?
I've create a movable minimap dialogitem which can move following a unit. here's the code:
ui_minimap TriggerAddEventTimePeriodic(0.1,c_timeGame) PickEachInteger(1,player_count) actions SetVariable(pos_minimap[player_num[(IntLoopCurrent())]],(world_to_ui((UnitGetPosition(unit[player_num[(IntLoopCurrent())]])),minimap_length))) DialogControlSetPosition(component_minimap,(PlayerGroupSingle(player_num[(IntLoopCurrent())])),c_anchorTopLeft,(FixedToInt((PointGetX(pos_minimap[player_num[(IntLoopCurrent())]])))),(FixedToInt((PointGetY(pos_minimap[player_num[(IntLoopCurrent())]])))))
ui_minimap SetVariable(minimap_length,2560.0) DialogControlCreateFromTemplate(dlg_minimap,c_triggerControlTypePanel,MinimapPanel/MinimapPanelTemplate) SetVariable(component_minimap,(DialogControlLastCreated())) DialogControlSetSize(component_minimap,(PlayerGroupAll()),(FixedToInt(minimap_length)),(FixedToInt(minimap_length))) CreateDialogItemImage(dlg_minimap,320,320,c_anchorTopLeft,0,0,Param/Value/217A01B0,minimap.dds,c_triggerImageTypeNormal,true,Color(100,100,100),c_triggerBlendModeNormal) TriggerEnable(ui_minimap,true)
world_to_ui return:point references: pos_world = null <point> length = 0.0 <fixed> pos = null <point> SetVariable(pos,(Point((ArithmeticReal((ArithmeticReal((PointGetX(pos_world)),*,(ArithmeticReal(length,/,-256.0)))),+,160.0)),(ArithmeticReal((ArithmeticReal((PointGetY(pos_world)),*,(ArithmeticReal(length,/,256.0)))),+,(ArithmeticReal(160.0,-,length))))))) Return(pos)
set_game_ui HideGameUI(false,(PlayerGroupAll())) UISetFrameVisible((PlayerGroupAll()),c_syncFrameTypeMinimapPanel,true) DialogCreate(320,320,c_anchorTopRight,20,20,false) SetVariable(dlg_minimap,(DialogLastCreated())) DialogSetImageVisible(dlg_minimap,false) DialogSetVisible((DialogLastCreated()),(PlayerGroupAll()),true) ui_minimap()
i want to make this minimap round, and hide four cornors. however, only static minimap can be made round in my ability. can you give me some suggestions?