Skip to content
This repository
Browse code

A winder and chain supporting the spiked-block.

  • Loading branch information...
commit 7db8135dcbee46e377d711281015cc9fea7840eb 1 parent da4e6e9
Richard Kettering rkettering authored
47 data/objects/enemies/milgram-hazards/spiked_block.cfg
@@ -5,10 +5,18 @@ platform_area: [10,14,54,15],
5 5 properties: {
6 6 attack_damage: "if(animation in ['fall'],128,1)",
7 7 team: "'evil'",
  8 + rope_bottom: "midpoint_y - 44",
  9 + set_rope: "vars.chain.set_ends(self.midpoint_x+5,
  10 + rope_bottom,
  11 + self.midpoint_x+5,
  12 + self.y1_bound+18)"
8 13 },
9   -on_create: "schedule(vars.phase,animation('fall'))",
10   -on_process_fall: "if(y + img_h > vars.y2_bound, [animation('normal'),schedule(vars.delay_rise,animation('rise'))])",
11   -on_process_rise: "if(y < vars.y1_bound, [animation('normal'),schedule(vars.delay_fall,animation('fall'))])",
  14 +on_create: "[schedule(vars.phase,animation('fall')),
  15 + spawn(self.type + '.chain_winder', mid_x+1*facing, y1_bound-2, facing, [set(vars.winder, child),set(child.z,z-2)]),
  16 + spawn('rope_angled_controller', self.x, self.y, 0, [set(vars.chain, child), set(child.animation,'chain'),set(child.z,z-1)])]",
  17 +on_process_fall: "if(y + img_h > vars.y2_bound, [animation('normal'),set(vars.winder.animation,'still'),sound('thump-deepB.wav'),schedule(vars.delay_rise,[animation('rise'),set(vars.winder.animation,'normal')])])",
  18 +on_process_rise: "if(y < vars.y1_bound, [animation('normal'),set(vars.winder.animation,'still'),schedule(vars.delay_fall,[animation('fall'),set(vars.winder.animation,'drop')])])",
  19 +on_process: "set_rope",
12 20 editor_info: {
13 21 category: "enemies, milgramen",
14 22 var: [
@@ -64,4 +72,37 @@ animation: [
64 72 accel_y: 80,
65 73 },
66 74 ],
  75 + object_type: {
  76 + id: "chain_winder",
  77 + properties: {
  78 + attack_damage: 2,
  79 + team: "'evil'",
  80 + },
  81 + on_end_anim: "set(animation, animation)",
  82 + animation: [{
  83 + id: "normal",
  84 + image: "props/spiked-block.png",
  85 + rect: [64,0,143,31],
  86 + duration: 5,
  87 + frames_per_row: 1,
  88 + frames: 4,
  89 + play_backwards: yes,
  90 + },
  91 + {
  92 + id: "still",
  93 + image: "props/spiked-block.png",
  94 + rect: [64,0,143,31],
  95 + duration: 5,
  96 + frames_per_row: 1,
  97 + frames: 1,
  98 + },
  99 + {
  100 + id: "drop",
  101 + image: "props/spiked-block.png",
  102 + rect: [64,0,143,31],
  103 + duration: 1,
  104 + frames_per_row: 1,
  105 + frames: 4,
  106 + }],
  107 + },
67 108 }
BIN  images/props/spiked-block.png
0  sounds/unused/thump-deep-b.wav → sounds/thump-deepB.wav
File renamed without changes

0 comments on commit 7db8135

Please sign in to comment.
Something went wrong with that request. Please try again.