+ end;
+ // timer: wait & activate group
+ BeginTrigger(f, wrX, -48, 16, 16, 1, -1, TRIGGER_PRESS, 0, 0);
+ SwitchTrigger(f, wrX, -64, 32, 16, SecToTick(wait), 1, 0, false);
+ EndTrigger(f);
+ // timer: wait & unlock start
+ BeginTrigger(f, wrX + 16, -48, 16, 16, 1, -1, TRIGGER_ON, 0, 0);
+ SwitchTrigger(f, wrX, -80, 16, 16, SecToTick(wait), 1, 0, false);
+ EndTrigger(f);
+ Inc(wrX, 32)
+ end;
+ MP_EXTENDER, MP_RANDOM, MP_SWITCH, 501..800:
+ begin
+ wait := IfThen(t.s in [MP_EXTENDER, MP_RANDOM, MP_SWITCH], 0, t.s - 500);
+ typ := IfThen(t.s in [MP_EXTENDER, MP_RANDOM, MP_SWITCH], mp2df_trig[t.s], TRIGGER_PRESS);
+ BeginTrigger(f, t.x, t.y, Round(16 * t.sx), Round(16 * t.sy), 1, -1, typ, mp2df_act[t.t], 0);
+ SwitchTrigger(f, t.x0, t.y0, t.x1 - t.x0, t.y1 - t.y0, SecToTick(wait), 1, 0, t.s = MP_RANDOM);
+ EndTrigger(f)
+ end;
+ MP_DAMAGE:
+ begin
+ if (t.x = t.x0) and (t.y = t.y0) and (16 * t.sx = t.x1 - t.x0) and (16 * t.sy = t.y1 - t.y0) then
+ begin
+ BeginTrigger(f, t.x, t.y, t.x1 - t.x0, t.y1 - t.y0, 1, -1, TRIGGER_DAMAGE, mp2df_act[t.t], 0);
+ DamageTrigger(f, 666, 0, 0);
+ EndTrigger(f)
+ end
+ else
+ begin
+ // TODO find non intersectable location for activation
+ BeginTrigger(f, t.x, t.y, Round(16 * t.sx), Round(16 * t.sy), 1, -1, TRIGGER_PRESS, mp2df_act[t.t], 0);
+ SwitchTrigger(f, t.x0, t.y0, 16, 16, 0, 1, 0, false);
+ EndTrigger(f);
+ BeginTrigger(f, t.x0, t.y0, t.x1 - t.x0, t.y1 - t.y0, 1, -1, TRIGGER_DAMAGE, 0, 0);
+ DamageTrigger(f, 999, 0, 0);
+ EndTrigger(f);
+ for j := 0 to High(tiles) do
+ if (j <> i) and isCollide(t.x0, t.y0, 16, 16, tiles[j].x0, tiles[j].y0, tiles[j].x1 - tiles[j].x0, tiles[j].x1 - tiles[j].y0) then
+ WriteLn('waring: trigger damage may activate triggers at ', t.x0, 'x', t.y0)