FOnline Development > Questions and Answers
Item flags for colorization
(1/1)
Zinthos:
hello, i just found this in _defines.fos
--- Code: ---#define ITEM_COLORIZE (0x00400000)
#define ITEM_COLORIZE_INV (0x00800000)
--- End code ---
setting this flag on an item via `itemflags makes the item disappear. does this flag do what i think it does? colorizing item sprites like with DrawSprite?
another question, how do i make an item completely clickable through? if its even possible
Wipe:
ITEM_COLORIZE is just a part of what you need.
Next step you -most likely- need is to pack RGB/RGBA into single (u)int, just like it's done internally by engine. For that, run `getcolor R G B or `getcolor R G B A replacing letters with wanted value. You'll get a number which you're supposed to remember/note.
And finally, apply the color to Item itself using `itemlight -c NUMBER which should make everything working. I *think* Item::LightColor was used for both, light and colorizing but i can't be 100% sure without time machine.
--- Quote from: Zinthos on June 02, 2018, 01:35:19 pm ---another question, how do i make an item completely clickable through? if its even possible
--- End quote ---
Not sure if it's possible but hey, in worst case you can mark item as hidden and use DrawSprite( item.PicMap ) :D
If you need item just for decoration, you can experiment with ITEM_NO_LOOT/ITEM_NO_STEAL/ITEM_CAN_LOOK/ITEM_CAN_PICKUP/ITEM_CAN_USE flags; setting all NO flags and unsetting all CAN flags should make it practically same as scenery. Pay attention to testing hotkeys and such on edited items; your scripts may ignore itemflags and do things you don't want - like decrafting APAs into materials etc. They most likely will still "steal" mouseclicks so it might not be useful in some cases
Navigation
[0] Message Index
Go to full version