Author Topic: Disable item fadein and fadeout for a single item  (Read 1631 times)

I am having issues with an item model

thisgifistobig

as shown in the image, the model is much brighter after fading back in from being picked up.
So how do I disable the fading for just this model.

There is probably a better solution. No other items do that, so I must assume that you did something wrong. So you just need to figure that out or wait till someone else does.

There is probably a better solution. No other items do that, so I must assume that you did something wrong. So you just need to figure that out or wait till someone else does.
It deals with setting the item's color and using an alpha value that isn't 1

There isn't a better solution, and I'm asking how to do this.

It deals with setting the item's color and using an alpha value that isn't 1

There isn't a better solution, and I'm asking how to do this.
Ok. Package Item::fadeOut(%obj) and Item::fadeIn(%obj). You're best best is probably just to not call the parent if it's your item and to change %obj.canPickup appropriately.

Okay so I packaged it and everything correctly, but how do I make it so it only effect my item and not all the other items?

Okay so I packaged it and everything correctly, but how do I make it so it only effect my item and not all the other items?
%obj.getDatablock() $= "MyItem"

%obj.getDatablock() $= "MyItem"
No.
%obj.getDataBlock().getName() $= "MyItem"

Why string comparisons?

%obj.getDataBlock() == nameToID("MyItem")

Why string comparisons?

%obj.getDataBlock() == nameToID("MyItem")
Just out of curiosity. Why use that instead of %obj.getDataBlock() == MyItem.getID()?

Just out of curiosity. Why use that instead of %obj.getDataBlock() == MyItem.getID()?

Not that much of a reason, but if you really want one, calling a function is faster than calling a method on an object.

thank you for your help guys, i got it working but decided on a different effect.