gfxshadow {int} {shadowbase}
handable via script with new "shadowbase" prop in entityproperty
- Changes entity's shadow effect.
- 0 = (default) Use generic shadow set.
- 1 = Use entity's current frame for the shadow. Yes, the shadow will be more realistic with this. The angle and length of shadow is defined by 'light' (see below).
- {shadowbase} controls how the shadow works in platforms (4287+)
- gfxshadow 1 = default gfxshadow
- gfxshadow 1 0 = default gfxshadow
- gfxshadow 1 1 = no shadow changes on platform/basemap (old builds)
- gfxshadow 1 2 = 2D-like shadow (like platform games)
- gfxshadow 1 3 = combination 1+2
name hero
type player
gfxshadow 1 1
health 100
Thanks maxman, I would like to disable the shadow only when the entities are on a platform.The second parameter of gfxshadow has one for no shadow which is set to 1.
Code:name hero type player gfxshadow 1 1 health 100
You're right. Just tested it and it looks weird when there's your shadow below you.Thanks maxman, I would like to disable the shadow only when the entities are on a platform.
void main(){
void self = getlocalvar("self");
int y = getentityproperty(self, "y");
int base = getentityproperty(self, "base");
if(base){
changeentityproperty(self, "gfxshadow", 0);
}if(base == 0 && y < 1){
changeentityproperty(self, "gfxshadow", 1);
changeentityproperty(self, "shadowbase", 2);
}
}
onmoveascript data/scripts/shadowbase.c