1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
[object_type]
id=pressure_plate
zorder=10
solid_area=2,3,42,7
[editor_info]
category=props
[var]
name=linked_object
type=label
[/var]
[/editor_info]
[vars]
objects_standing_on="[]"
linked_object="''"
[/vars]
on_enter_pushed_anim="if(get_object(level, linked_object), fire_event(get_object(level, linked_object), 'button_pressed'))"
on_leave_pushed_anim="if(get_object(level, linked_object), fire_event(get_object(level, linked_object), 'button_released'))"
on_jumped_on="[animation('pushed'),
set(vars.objects_standing_on, vars.objects_standing_on + [jumped_on_by])]"
on_process_pushed="[set(vars.objects_standing_on, filter(vars.objects_standing_on, 'obj', obj.standing_on = context.me and (not obj.destroyed) and (not obj.vars.removed_from_play))), if(vars.objects_standing_on.size = 0, animation('normal'))]"
[animation]
id=normal
image=props/interactive-props.png
rect=1,120,46,127
accel_y=100
[/animation]
[animation]
id=pushed
image=props/interactive-props.png
rect=49,120,94,127
accel_y=100
[/animation]
[/object_type]
|