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 41 42 43 44 45 46 47 48 49
|
{
id: "checkpoint_controller",
ignore_collide: true,
hidden_in_game: true,
vars: {
zone_x1: 0,
zone_x2: 0,
zone_y1: 0,
zone_y2: 0,
},
on_process: "if(level.player.midpoint_x > vars.zone_x1 and level.player.midpoint_x < vars.zone_x2 and level.player.midpoint_y > vars.zone_y1 and level.player.midpoint_y < vars.zone_y2 and level.player.hitpoints > 0,
[checkpoint_game(), die()])",
zorder: 50,
editor_info: {
category: "controllers",
var: [
{
name: "zone_x1",
type: "x",
value: "x-70",
},
{
name: "zone_x2",
type: "x",
value: "x+130",
},
{
name: "zone_y1",
type: "y",
value: "y-200",
},
{
name: "zone_y2",
type: "y",
value: "y+200",
},
],
},
animation: {
id: "normal",
image: "effects/particles.png",
x: 148,
y: 135,
w: 28,
h: 28,
frames: 1,
duration: 100000,
},
}
|