Vous n'êtes pas identifié(e). Pour pouvoir écrire ou répondre à un message, vous devez vous connecter ou vous créer un compte sur JAWA.

#1 05-12-2021 02:20:44

Wall Dog Games
Membre
Inscription : 17-07-2021

Roaming Enemy? ✓

Hi, I'm working on a point-and-click horror game and would like to add a little danger for the character rather than just implied suspense. Is it possible to have a patrolling enemy in the game? Preferably one that would come and go at random? For game examples of what I'm trying to do, check out the original Clocktower for SNES.

Thank you.

Hors ligne

#2 06-12-2021 18:46:44

jawa
Admin

Re : Roaming Enemy? ✓

Hello

There are several ways to trigger a "surprise" event.

1) You can create a background job running every XX minutes (parameters > background job).
In this job you roll a dice and if the score is above a threshold you make the enemy appear

variable:dice:[rand:0:100]
condition:dice>80
// 80% of chances to appear
activate:<a script that  will make the enemy appear and bothers the player>
condition:end

You can create  several background jobs at different periodicity. For instance, in a horror game you can create a job to play a creepy sound at different time of the games.

2) Instead of a background job, you can create an autonomous behavior on the enemy character, with the same kind of dice rolling mechanism. An autonomous behavior is an interaction (or a set of interactions with different conditions to change the behavior depending on the context) attached to an object to give it its own life, and that triggers automatically and repeat while the player is in the same room, without requiring a claick action of the player and without interrupting the game.


3) if your game uses the 3rd person view, a good way to trigger this kind of event is to use a "walk on" interraction. To do so, create a "bounding box" object, place it on the ground, and add a "combine with" interaction on it with the avatar (combine the avatar with the bounding box).

hope it helps.

Z

#3 11-12-2021 21:13:06

Wall Dog Games
Membre
Inscription : 17-07-2021

Re : Roaming Enemy? &check;

Thank you! I will try that.

Hors ligne

Pied de page des forums