Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Levers are now toggled by thrown objects again

  • Loading branch information...
commit c95034464452c9116c6b0bb09250f4a1cb8eb1c7 1 parent 7db8135
marcavis marcavis authored
4 data/objects/props-interactive/misc/lever.cfg
View
@@ -10,7 +10,7 @@ vars: {
pressed: 0,
},
on_create: "set(animation, if(vars.pressed, 'pushed', 'normal'))",
-on_collide_object_body: "if(collide_with.team = 'player' and (collide_with_area = 'attack'), get_hit_by(collide_with))",
+on_collide_object_body: "if(collide_with.team = 'player' and (collide_with_area in ['attack', 'thrown']), get_hit_by(collide_with))",
on_enter_pushed_anim: "[if(get_object(level, linked_object) and (not level.in_editor), fire_event(get_object(level, linked_object), 'button_pressed')), if(linked_object_list, map(linked_object_list, 'obj', fire_event(get_object(level, obj), 'button_pressed')))]",
on_leave_pushed_anim: "[if(get_object(level, linked_object) and (not level.in_editor), fire_event(get_object(level, linked_object), 'button_released')), if(linked_object_list, map(linked_object_list, 'obj', fire_event(get_object(level, obj), 'button_released')))]",
editor_info: {
@@ -44,4 +44,4 @@ animation: [
duration: 1000000,
},
],
-}
+}
4 data/objects/props-interactive/misc/lever_wooden.cfg
View
@@ -10,7 +10,7 @@ vars: {
pressed: 0,
},
on_create: "set(animation, if(vars.pressed, 'pushed', 'normal'))",
-on_collide_object_body: "if(collide_with.team = 'player' and (collide_with_area = 'attack'), get_hit_by(collide_with))",
+on_collide_object_body: "if(collide_with.team = 'player' and (collide_with_area in ['attack', 'thrown']), get_hit_by(collide_with))",
on_enter_pushed_anim: "[if(get_object(level, linked_object) and (not level.in_editor), fire_event(get_object(level, linked_object), 'button_pressed')), if(linked_object_list, map(linked_object_list, 'obj', fire_event(get_object(level, obj), 'button_pressed')))]",
on_leave_pushed_anim: "[if(get_object(level, linked_object) and (not level.in_editor), fire_event(get_object(level, linked_object), 'button_released')), if(linked_object_list, map(linked_object_list, 'obj', fire_event(get_object(level, obj), 'button_released')))]",
editor_info: {
@@ -44,4 +44,4 @@ animation: [
duration: 1000000,
},
],
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.