Example #1
0
func FxReleaseClonkFadeOutTimer (object pTarget, int iEffectNumber, int iEffectTime) {
  // Ausfaden
  if (!GetClrModulation (pTarget)) SetClrModulation(RGB(255, 255, 255), pTarget);
  SetClrModulation(DoRGBaValue(GetClrModulation(pTarget), Min(15, 255-GetRGBValue(GetClrModulation(pTarget),0)), 0), pTarget);
  // Wenn Overlay extra moduliert wird, auch extra ausfaden
  if (GetObjectBlitMode (pTarget) & 4) SetColorDw(DoRGBaValue(GetColorDw(pTarget), Min(15, 255-GetRGBValue(GetColorDw(pTarget),0)), 0), pTarget);
  if(GetRGBValue(GetColorDw(pTarget), 0) == 255 || GetRGBValue(GetClrModulation(pTarget), 0) == 255)
    return (-1);
}
Example #2
0
func FxPointingTimer(object target, int index, int time) {
	if(time > PT0D_Duration) {
		RemoveObject(target);
		return -1;
	}

	var clonk = GetCursor(EffectVar(0, target, index));
	var obj = EffectVar(1, target, index);
	var msg = EffectVar(2, target, index);

	// Zeiger hat kein Ziel mehr? Löschen.
	if(!obj) {
		RemoveObject(target);
		return -1;
	}

	var ang = Angle(GetX(clonk), GetY(clonk), GetX(obj), GetY(obj)) - 90;
	var dst = Min(PT0D_Distance, Distance(GetX(clonk), GetY(clonk), GetX(obj), GetY(obj)) / 2);

	SetR(ang + 90, target);
	SetPosition(GetX(clonk) + Cos(ang, dst), GetY(clonk) + Sin(ang, dst), target);

	var r, g, b, a;
	SplitRGBaValue(GetClrModulation(target), r, g, b, a);

	a = EvalEase(alphaEase, Min(254, time));
	SetClrModulation(RGBa(r, g, b, a), target);
	Message("<c %x>%s</c>", target, RGBa(r, g, b, 255 - a), msg);

	return true;
}
Example #3
0
global func SetObjAlpha(int byAlpha,object pObj) {
	var dwClrMod=GetClrModulation(pObj);
	if (dwClrMod == 0) dwClrMod = RGBa(255,255,255,0);

	dwClrMod = SetRGBaValue(dwClrMod,byAlpha,0);
 	return SetClrModulation(dwClrMod, pObj);
}
Example #4
0
func FxPointingStart(object target, int index, int temp, int plr, object obj, string msg) {
	SetVisibility(VIS_Owner, target);
	CreateParticle("PSpark", 0, 0, 0, 0, 500, GetClrModulation(), this, true);
	EffectVar(0, target, index) = plr;
	EffectVar(1, target, index) = obj;
	EffectVar(2, target, index) = msg;
	return true;
}
Example #5
0
// Sets the object's transparency.
global func SetObjAlpha(int by_alpha)
{
	var clr_mod = GetClrModulation();
	
	if (!clr_mod)
		clr_mod = by_alpha << 24;
	else
		clr_mod = clr_mod & 16777215 | by_alpha << 24;
	return SetClrModulation(clr_mod);
}
Example #6
0
global func GetObjAlpha()
{
	return (GetClrModulation() >> 24) & 0xFF;
}