Permalink
Browse files

Milgram Block footsteps

The Milgram Block now has footstep sounds!
(cherry picked from commit 3302404)
  • Loading branch information...
1 parent 4c7ddb1 commit 76d33cdf3c43edca2ffefbc087e1684520de2386 @sweetkristas sweetkristas committed Feb 23, 2013
@@ -28,7 +28,7 @@ properties: {
on_first_cycle: "[schedule_active(phase,animation('fall')),
spawn(self.type + '.chain_winder', mid_x+1*facing, y1_bound-2, facing, [set(vars.winder, child),set(child.z,z-2)]),
spawn('rope_angled_controller', self.x, self.y, 0, [set(vars.chain, child), set(child.animation,'chain'),set(child.z,z-1)])]",
-on_process_fall: "if(y + img_h > vars.y2_bound, [animation('normal'),set(vars.winder.animation,'still'),sound('thump-deepB.wav'),schedule_active(vars.delay_rise,[animation('rise'),set(vars.winder.animation,'normal')])])",
+on_process_fall: "if(y + img_h > vars.y2_bound, [animation('normal'),set(vars.winder.animation,'still'),sound('Thwump-Slam'+1d7+'.wav'),schedule_active(vars.delay_rise,[animation('rise'),set(vars.winder.animation,'normal')])])",
on_process_rise: "if(y < vars.y1_bound, [animation('normal'),set(vars.winder.animation,'still'),schedule_active(vars.delay_fall,[animation('fall'),set(vars.winder.animation,'drop')])])",
on_process: "[set_rope(),pump_events()]",
editor_info: {
@@ -12,6 +12,7 @@ on_process_stand: "if(is_standing, animation('walk'),if(velocity_y > 700,animati
on_collide_feet: "if(velocity_y > 700, animation('spring'),animation('walk'))",
on_end_spawned_anim: "animation('fall')",
on_process_walk: "set(accel_x,200)",
+on_footfall: "[sound('milgram-block-footstep'+1d7+'.wav', volume)] where volume = constrain(0, 300.0/distance(self, level.player),1.0)",
editor_info: {
category: "enemies, milgramen",
},
@@ -61,7 +62,7 @@ animation: [
accel_y: 80,
body_area: "all",
id: "walk",
-
+ events: "0:footfall",
#blink variant
attack_area: [15,18,26,26],
rect: [89,1,113,28],
@@ -76,6 +77,7 @@ animation: [
accel_y: 80,
body_area: "all",
id: "walk",
+ events: "0:footfall",
attack_area: [15,18,26,26],
duplicates: 6,
rect: [3,1,27,28],
@@ -29,7 +29,7 @@ timer_frequency: 5,
on_timer: "cull_dead_spawnees()",
on_shoot: "[[
- sound('pollen-shot.wav'),
+ sound('Jellyfish-Spawn'+1d2+'.wav'),
add_object(obj),
set(obj.velocity_y, 500*up),
add(vars.spawned_objects, [obj]),
@@ -123,7 +123,7 @@ object_type: [
object_level_collisions: true,
prototype: ["shot"],
on_create: "add_particles('particles')",
- on_die: "[spawn('pollen_impact_particle',midpoint_x,midpoint_y,0)]",
+ on_die: "[spawn('pollen_impact_particle',midpoint_x,midpoint_y,0),sound('seed-fall'+1d4+'.wav')]",
timer_frequency: 4,
on_timer: "set(rotate, cycle*10)",
on_end_anim: "die()",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -2023,7 +2023,9 @@ class set_function : public function_expression {
}
if(!key_.empty()) {
- set_command* cmd = new set_command(variant(), key_, args()[1]->evaluate(variables));
+ static const std::string MeKey = "me";
+ variant target = variables.query_value(MeKey);
+ set_command* cmd = new set_command(target, key_, args()[1]->evaluate(variables));
cmd->set_expression(this);
return variant(cmd);
}

0 comments on commit 76d33cd

Please sign in to comment.