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
Last revisionBoth sides next revision
4rpl:commands:setunitminimapimage [2021/01/31 13:57] virgilw4rpl:commands:setunitminimapimage [2023/10/13 21:59] – Added an easily modifiable template. Vertu
Line 8: Line 8:
 ===== Description ===== ===== Description =====
 Sets the minimap image for the unit. The imageData is a string consisting of 0, 1, 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. Sets the minimap image for the unit. The imageData is a string consisting of 0, 1, 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 
- 101200000001  + 101200000001 
- 101200100001  + 101200100001 
- 101200100001  + 101200100001 
- 101111111001  + 101111111001 
- 100000122001  + 100000122001 
- 100000120001  + 100000120001 
- 100000120001  + 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 
 + 000012210000 
 + 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.txt · Last modified: 2023/10/22 14:43 by Vertu