summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/ShootInventory.c
diff options
context:
space:
mode:
authorJan <>2015-02-02 17:55:29 +0100
committerJan <_>2015-07-10 17:49:45 +0200
commit32a9632fbca3dd7a88bd3154b84a3773af39c276 (patch)
treea226b9404844a73c7229e9d13db993c86b5be2c1 /TemplePushing.c4s/System.c4g/ShootInventory.c
parent40fb3e5d61c44886b06d839a35adb0c11a5f918f (diff)
downloadtempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.tar.gz
tempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.zip
TemplePush v6.1.7601.18409.c4s
Diffstat (limited to 'TemplePushing.c4s/System.c4g/ShootInventory.c')
-rw-r--r--TemplePushing.c4s/System.c4g/ShootInventory.c53
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