KevinTheHunter

Villager
Member
Joined
Sep 9, 2019
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMV
I´m making a stealth game and I want the enemy to show a balloon icon, when the player is X steps close to the enemy, but also if the player is one step closer, then an animation would play and would put the player at the start of the level.
I tried EventChasePlayer plugin and a common event, but I can´t put the common event on a certain enemy/NPC. I´d have to make hundreds common events for every enemy on the map for it to work. And even then I´d need another common event for the transfer to the starting position, right?

Also, I´d like the enemies to have a flashlight and if the player approaches the light, the light would change color once(this would be at the same time, when the balloon icon appears) and once again if the player comes one step closer to the flashlight. The flashlight color should only change, when the player touches it.

There are a few questions in one. Anyone have any ideas?
 

BK-tdm

Waifumancer
Veteran
Joined
Jun 21, 2018
Messages
532
Reaction score
1,622
First Language
English
Primarily Uses
RMMV
Not really a hundred common events just a looong parallel process that checks player X,Y vs event 1,2,3,4... X,Y and If the distance is X then apply the balloon/light changes you want.
 

KevinTheHunter

Villager
Member
Joined
Sep 9, 2019
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMV
Not really a hundred common events just a looong parallel process that checks player X,Y vs event 1,2,3,4... X,Y and If the distance is X then apply the balloon/light changes you want.
Can you give an example how to do that? I tried, but I´m kinda stuck. I went to do a common event, then in control variables selected the player and position X. After that I don´t know what.
 

BK-tdm

Waifumancer
Veteran
Joined
Jun 21, 2018
Messages
532
Reaction score
1,622
First Language
English
Primarily Uses
RMMV
Id reccomend using a parallel process for the flashlight thing, and placing it on the map you need, you need player position x AND y saved as different variables, then event positions too as different variables and do a math of player x - event 1,2,3... x and player y - event 1,2,3... y if the result is 1 or whatever distance you want you apply the changes, for example if distance is 2 for flashlight you change the color.
I would make it so the chasing events are "player touch" type and transfer you to a given location, you can common event this if you want the flashlight thing is the only one that would need nested ifs on a parallel.

As a developer of a stealth game i reccomend you to never make maps too big and crowded, as the checks and pathfinding needed for stealth mechanics can bog things down, keep the maps medium sized and try to keep enemies on the 1-12 range.
 

KevinTheHunter

Villager
Member
Joined
Sep 9, 2019
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMV
Id reccomend using a parallel process for the flashlight thing, and placing it on the map you need, you need player position x AND y saved as different variables, then event positions too as different variables and do a math of player x - event 1,2,3... x and player y - event 1,2,3... y if the result is 1 or whatever distance you want you apply the changes, for example if distance is 2 for flashlight you change the color.
I would make it so the chasing events are "player touch" type and transfer you to a given location, you can common event this if you want the flashlight thing is the only one that would need nested ifs on a parallel.

As a developer of a stealth game i reccomend you to never make maps too big and crowded, as the checks and pathfinding needed for stealth mechanics can bog things down, keep the maps medium sized and try to keep enemies on the 1-12 range.
Awesome. thanks.
 

KevinTheHunter

Villager
Member
Joined
Sep 9, 2019
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMV
Id reccomend using a parallel process for the flashlight thing, and placing it on the map you need, you need player position x AND y saved as different variables, then event positions too as different variables and do a math of player x - event 1,2,3... x and player y - event 1,2,3... y if the result is 1 or whatever distance you want you apply the changes, for example if distance is 2 for flashlight you change the color.
I would make it so the chasing events are "player touch" type and transfer you to a given location, you can common event this if you want the flashlight thing is the only one that would need nested ifs on a parallel.

As a developer of a stealth game i reccomend you to never make maps too big and crowded, as the checks and pathfinding needed for stealth mechanics can bog things down, keep the maps medium sized and try to keep enemies on the 1-12 range.
I made the parallel processes, but got stuck on "...then event positions too as different variables and do a math of player x - event 1,2,3... x and player y - event 1,2,3... y if the result is 1 or whatever distance you want you apply the changes, for example if distance is 2 for flashlight you change the color."
How do I compare these numbers?
Also could you check these photos below if i wrote it correctly?

3.jpg2.jpg1.jpg
4.jpg
 

Latest Threads

Latest Posts

Latest Profile Posts

You know.. I... I kinda lost my interest in living a long time ago. What sustains me is a lack of interest in dying.
Like a star that is balanced between the forces of gravity and outward pressure, I feel like the energy to produce that outward pressure is weakening. I feel like I should pull a Stardew Valley and revert to a more primitive lifestyle, away from others. :(
made more sprite for the Time passing game that I may or may not actually make. At least now I have a better idea how to make Rtp Walk sprites actually look wrinkly and old, since the Generator doesn't do that.
Well, now all of my Refreshable Events scripts also feature some brand new demos to let people see how easy it is to let the script handle the refreshing of a given set of events. All of this with just one specific script call per event!
Sorry Kitty...I'm practicing my harmonics. RIP your ears.
I noticed they now have a Gremlins cartoon. Nothing like striking when the iron is hot then trying to make a reboot from a movie made 34 years ago.

Forum statistics

Threads
131,585
Messages
1,221,260
Members
173,284
Latest member
untamedeventuality
Top