diff options
Diffstat (limited to 'TemplePushing.c4s/System.c4g/ShootInventory.c')
| -rw-r--r-- | TemplePushing.c4s/System.c4g/ShootInventory.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/TemplePushing.c4s/System.c4g/ShootInventory.c b/TemplePushing.c4s/System.c4g/ShootInventory.c new file mode 100644 index 0000000..f2636dd --- /dev/null +++ b/TemplePushing.c4s/System.c4g/ShootInventory.c @@ -0,0 +1,53 @@ +/*-- 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; +}
\ No newline at end of file |
