『Illbleed』風のゲームプレイ作成の助けが必要です

I want to make gameplay that is similar to a game called Illbleed. The main gameplay is that you have to avoid and disarm traps using a specific device. If you run into a trap, it’ll play a jumpscare. But if you disarm the trap, it won’t play and will give you a reward.

This video at 12:59 explains the mechanics more in-depth.

I want a way to make traps in the game where if you trigger them, they’ll play an animated cutscene. I also want this mechanic to be locked away by a certain item. Also, I want to have something where the senses go off when nearby a trap, just like in Illbleed. Is there a plugin or work around to do all of this?

イベントのみで、プラグインなしでもかなり近い表現が可能です。各トラップは「プレイヤー接触」イベントとし、ノートに <trap:sight> や <trap:smell> のようなタグを付与します。1ページ目はジャンプスケア用です。本格的なアニメーションを表示したい場合は「ムービーの再生」が便利です(moviesフォルダ内にwebmファイルを用意)。2ページ目の条件は「自己スイッチA ON」にして中身は空のままにし、これが解除済みのトラップとして機能します。

装置については、共通イベントを実行するキーアイテムを作成し、それを持っている人物のみがトラップを検知できるようにします。共通イベントではアドレナリンコストを消費した上で、キャラクターが向いているタイルをチェックし、そこに設置されているトラップを解除します:

var d = $gamePlayer.direction();
var x = $gameMap.roundXWithDirection($gamePlayer.x, d);
var y = $gameMap.roundYWithDirection($gamePlayer.y, d);
var id = $gameMap.eventIdXy(x, y);
var e = $gameMap.event(id);
if (e && e.event().meta.trap) $gameSelfSwitches.setValue([$gameMap.mapId(), id, "A"], true);

報酬もこの if 文の中に含めることができます。感覚系については、並列実行の共通イベントで、以下のスクリプトを使って各タイプの最も近い武装済みトラップまでの距離を変数に格納します。「sight」の部分をそれぞれの感覚に置き換えてください:

Math.min(99, ...$gameMap.events().filter(e => e.event().meta.trap === "sight" && !$gameSelfSwitches.value([$gameMap.mapId(), e.eventId(), "A"])).map(e => $gameMap.distance($gamePlayer.x, $gamePlayer.y, e.x, e.y)))

そして、その数値が3以下など低くなったときに、メーター画像を表示したり、音を鳴らしたり、アイコンを点滅させたりすることができます。