User Tools

Site Tools


4rpl:commands:setunitminimapimage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:setunitminimapimage [2021/01/31 13:00] Regallion4rpl:commands:setunitminimapimage [2023/10/22 14:43] (current) – [Examples] Fixed 2nd example preset Vertu
Line 7: Line 7:
  
 ===== Description ===== ===== Description =====
-Sets the minimap image to appear for the unit. The imageData is a string consisting of 0 and 1 characters. It should be 144 characters long (a 12x12 square) with the top left corner being the first 'pixel' of the resulting image.+Sets the minimap image for the unit. The imageData is a string consisting of 01, and 2 characters. It should be 144 characters long (a 12x12 square) with the top left corner being the first 'pixel' of the resulting image. A 0 means a transparent pixel, a 1 means a 'white' pixel, and '2' means a black  pixel. Note that [[SetUnitMiniMapImageColor]] can be used to change the color of the 'white' pixels. 
 +Note that this only works for custom units - built-in units cannot have their image overwritten.
  
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
-"111111111111  +   "111111111111 
- 100000000001  + 100000000001 
- 101000000001  + 101200000001 
- 101000100001  + 101200100001 
- 101000100001  + 101200100001 
- 101111111001  + 101111111001 
- 100000100001  + 100000122001 
- 100000100001  + 100000120001 
- 100000100001  + 100000120001 
- 100000000001  + 100000000001 
- 100000000001 + 100000000001 
- 111111111111" RemoveWhiteSpace ->miniMapImage + 111111111111" RemoveWhiteSpace ->miniMapImage 
-SetUnitMiniMapImage(self <-miniMapImage)+ SetUnitMiniMapImage(self <-miniMapImage
 +</code> 
 +<code 4rpl> 
 +   "000000000000 
 + 000000000000 
 + 000000000000 
 + 000000000000 
 + 000011110000 
 + 000012210000 
 + 000012210000 
 + 000011110000 
 + 000000000000 
 + 000000000000 
 + 000000000000 
 + 000000000000" RemoveWhiteSpace ->miniMapImage 
 + SetUnitMiniMapImage(self <-miniMapImage) 
 + SetUnitMiniMapImageColor(self V4(0 1 0 1))
 </code> </code>
  
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
4rpl/commands/setunitminimapimage.1612116024.txt.gz · Last modified: 2021/01/31 13:00 by Regallion