func FxShadowWalkStop(object target, proplist effect, int reason, bool temporary) { if(temporary || !target) return; target.Visibility = VIS_All; target->SetClrModulation(RGBa(255, 255, 255, 255)); target->Sound("reappear", false, 50); //target->CreateParticle("Smoke", PV_Random(-5,5), PV_Random(-10,10), PV_Random(-5,5), 0, 30, Particles_Smoke(), 20); }
func Launch(object clonk, int x, int y) { CreateParticle("Smoke", PV_Random(-5,5), PV_Random(-10,10), PV_Random(-5,5), 0, 30, Particles_Smoke(), 20); clonk.Visibility = VIS_Owner; clonk->SetClrModulation(RGBa(255,255,255,50)); clonk->Sound("vanish", false, 50); var fx = AddEffect("ShadowWalk", clonk, 20, 1, nil, GetID()); fx.dur = Dur; RemoveObject(); }
func Launch(object clonk, int x, int y) { if(clonk.TimeTravelMark == nil) { clonk.TimeTravelMark = [clonk->GetX(), clonk->GetY()]; clonk.timeposfx = AddEffect("TravelPos", clonk, 1, 1, nil, GetID(), Size); clonk.timeposfx.size = Size; clonk.timeposfx.dur = Dur; clonk->Sound("travel_pos", false, 30, clonk->GetOwner()); RemoveObject(); return 1; }
func JumpEffect(object clonk, dir) { var from; var to; if (dir == "Up") { from = 50; to = 130; } if (dir == "Left") { from = -30; to = 50; } if (dir == "Right") { from = 130; to = 210; } if (dir == "Down") { from = 230; to = 310; } clonk->Sound("time_hit", false, 30); for(var i = from; i < to; i+=5) { var r = 10; var x = clonk->GetX() + Cos(i, r); var y = clonk->GetY() + Sin(i, r); var angle = Angle(0,0,Cos(i, r),Sin(i, r)); var trailparticles = { Prototype = Particles_ElectroSpark2(), Size = PV_Linear(10,0), Rotation = angle, R = 255, G = 165, B = 50, OnCollision = PC_Bounce(), }; CreateParticle("Lightning", x, y, Cos(i, r), Sin(i, r), 10, trailparticles); } }
func JumpEffect(object clonk, dir) { var from, to; if (dir == "Up") { from = 50; to = 130; } if (dir == "Left") { from = -30; to = 50; } if (dir == "Right") { from = 130; to = 210; } if (dir == "Down") { from = 230; to = 310; } clonk->Sound("Fire::Inflame", false, 30, nil, nil, nil, -100); var trailparticles = { Size = PV_Linear(0, 20), Alpha = PV_Linear(255, 0), OnCollision = PC_Die(), CollisionVertex = 0, DampingX = 900, DampingY = 900, BlitMode = GFX_BLIT_Additive }; trailparticles = Particles_Colored(trailparticles, GetPlayerColor(clonk->GetOwner())); for(var i = from; i < to; i+=5) { var r = 10; var x = Cos(i, r); var y = Sin(i, r); clonk->CreateParticle("Shockwave", x, y, Cos(i, r), Sin(i, r), 60, trailparticles, 2); } }
func ControlUseStart(object clonk, int x, int y) { clonk->Sound("Objects::WallKit::Click"); SetPreview(clonk,x,y); return true; }