Skip to content

Commit

Permalink
Added URU style fall catching
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Feb 27, 2022
1 parent a98f4a7 commit 5967784
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions src/projects/alias-nightmare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,31 @@ ON INIT {
}
ON CONTROLLEDZONE_ENTER {
IF (${self.state.isCatching} == 1) {
ACCEPT
}
SET ${self.state.isCatching} 1
GOSUB FADEOUT
TIMERfadein -m 1 1000 GOSUB FADEIN NOP
TIMERfadein -m 1 300 GOSUB FADEIN NOP
ACCEPT
}
>>FADEOUT {
WORLDFADE OUT 1000 ${color("black")}
WORLDFADE OUT 300 ${color("black")}
PLAY -o "UruLink"
RETURN
}
>>FADEIN {
TELEPORT -p ${target.ref}
TIMERfadein -m 1 1000 WORLDFADE IN 300
SET ${self.state.isCatching} 0
TIMERfadein -m 1 2000 WORLDFADE IN 1000
RETURN
}
`;
}),
addDependencyAs("projects/alias-nightmare/UruLink.wav", `sfx/UruLink.wav`),
declare("int", "isCatching", 0),
createItem
)(items.marker);
};
Expand Down Expand Up @@ -182,7 +189,7 @@ const generate = async (config) => {
defineStatue();
createStatue(islands[2].pos);

// createFallSaver(islands[0].pos, welcomeMarker);
createFallSaver(islands[0].pos, welcomeMarker);

return compose(
saveToDisk,
Expand All @@ -205,7 +212,7 @@ const generate = async (config) => {
-origin[0] +
(MAP_MAX_WIDTH / divider) * 50 +
(MAP_MAX_WIDTH / divider) * 100 * x,
500,
10000,
-origin[2] +
(MAP_MAX_HEIGHT / divider) * 50 +
(MAP_MAX_HEIGHT / divider) * 100 * y,
Expand All @@ -222,14 +229,15 @@ const generate = async (config) => {
setTexture(textures.none),
setColor("white"),

// addZone(
// [0, 5000, 0],
// [15000, 100, 15000],
// `fall-detector`,
// ambiences.sirs,
// 5000
// ),
// setColor(colors.ambience[0]),
// TODO: expose control over flags and make fall detector not set ambience and color
addZone(
[0, 5000, 0],
[MAP_MAX_WIDTH * 100, 1000, MAP_MAX_HEIGHT * 100],
`fall-detector`,
ambiences.sirs,
5000
),
setColor(colors.ambience[0]),

addZone(
[-origin[0], 0, -origin[2]],
Expand Down

0 comments on commit 5967784

Please sign in to comment.