how change ICON with scripts?

ZVitor

Active member
this is what im trying to do, but game crash:

Code:
void self = getlocalvar("self");
void icone = loadsprite("data/chars/superman/portraitb2.gif");
changeentityproperty(self, "icon",icone );

need a different icon for a differente map pallete, and dont want to use weapon.
 
ZVitor I was reading the source code and I've found that you can get the entityproperty "icon", but you cannot set it. So, for now, its a read-only property.
But...you can use a trick:

Unless my reading is wrong, you can get and change the entityproperty called "iconposition". So you can use the same trick we use in Mugen for big portraits of different sides in Mugen - make an image with two different icons and add an space of the same screen height between them.

So you would just change the Y position of the icon when you are on that palette.

Got it?

The other idea would be to draw a new icon image using drawsprite, but is a tad more complex.

 
Back
Top Bottom