31
on_create="animation('normal')"
32
on_interact="[animation('opening'),sound('DoorOpen.ogg'),fire_event(level.player, 'start_interact')]"
34
on_end_normal_anim="animation('normal')"
35
on_end_opening_anim="[animation('open'),fire_event(level.player, 'end_interact'),fire_event('treasure_give'),schedule(50, fire_event('force_loot_acquire'))]"
36
on_end_open_anim="animation('open')"
39
###We must put this in a separate function, because loot only exists *after* the treasure_give event has fired. If we called it above, it would have no target.
40
on_force_loot_acquire="if(tmp.loot.size > 0,fire_event(tmp.loot[0],'acquired'))"
41
on_child_spawned="[if(vars.acquirable_child, set(child.collide_dimensions_in, [])),
42
set(tmp.loot, tmp.loot + [child])]"
45
on_treasure_give="if((not event_name in level.player.vars.triggered_events),[ spawn(spawn_type,midpoint_x,y-50,facing,[set(velocity_y,-1000),set(accel_y,40),set(zorder,12)]),set(level.player.vars.triggered_events, level.player.vars.triggered_events + [event_name])] )"
48
solid_area=16,16,47,47
50
image=props/interactive-props.png