/*-- Shoot inventory object --*/ #strict 2 #appendto AXE1 #appendto EGBL #appendto EFLN #appendto GBLT #appendto ROCK #appendto SWOR protected func Activate(object clonk) { [$Shoot$|Image=GNPW] // Sound if (GetID() == EGBL) { Sound("Crystal3"); } else if (GetID() == GBLT) { Sound("Crystal3"); } else { Sound("Blast2"); } // Make shooting clonk responsible for possible kill SetController(clonk->GetOwner()); // Shoot if (GetID() == EGBL) { Exit(0, -20 + 40 * clonk->GetDir()); SetXDir(-100 + 200 * clonk->GetDir()); } else if (GetID() == ROCK) { Exit(0, -15 + 30 * clonk->GetDir()); SetXDir(-100 + 200 * clonk->GetDir()); } else { Exit(0, -10 + 20 * clonk->GetDir()); SetXDir(-80 + 160 * clonk->GetDir()); } SetYDir(-10); return 1; }