Stealth Kill and Another Question

EpicFILE

Epic Member
Veteran
Joined
Sep 27, 2017
Messages
439
Reaction score
1,392
First Language
Indonesia
Primarily Uses
RMMV
Hello!
I want to make a stealth kill mechanism. (something like Tenchu and Metal Gear Solid)
To achieve this effect, I think I'm gonna use conditional branch.
Where the event/enemy will react differently depending on which direction it's facing.
There is something like that, but the choices are only up, down, left, and right.
No choice to determine if the enemy is facing toward the player or away from the player.
Is there any other way to make a stealth kill mechanism?

Another question:
I want to make an event that triggers battle instantly whenever it touches the player.
I've made an event that chase me whenever it sees me. The chase event works well. (using yanfly event chase)
But when the event is standing 1 tile beside me, it stops chasing.
And the battle won't occur unless I manually touch the event.
How to make the event triggers battle instantly?

Sorry if I'm asking too much questions.
Any help will be appreciated. Thanks!
 

The Stranger

The Faceless Friend
Veteran
Joined
Sep 14, 2012
Messages
3,341
Reaction score
21,535
First Language
British English
Primarily Uses
RMMV
Yanfly's Event Chase Player Plug-in has commands which allow you to determine whether an event can see the player or not. I haven't played around with it all that much, since my game is still in the early stages.

You might also want to take a look at this post by @dbchest. There's also some sort of plug-in linked on that page if you don't want to use the script call.

There might be an easier way to pull off forcing a battle while checking if an event is touching the player. In Ace I used a script call, as part of a conditional branch, which did this. However, I have no idea what the JS code would be which does the same thing.

Hope that helps in some small way. :)
 

dbchest

Beast Master
Veteran
Joined
Oct 1, 2013
Messages
434
Reaction score
306
First Language
English
Primarily Uses
RMMV
this is pretty random; i have been playing "The Evil Within 2" a LOT lately and i am going to make a stealth kill plugin for RPGMV because of that, haha. i will let you know when it is finished if you want to take a look at it.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
No choice to determine if the enemy is facing toward the player or away from the player.
look at the function moveTowardCharacter and see how it relates position and direction.

basically, if both are looking at the same direction, whomever is behind the other, is looking *at* the other.
to determine "behind", you evaluate XY position.
 

EpicFILE

Epic Member
Veteran
Joined
Sep 27, 2017
Messages
439
Reaction score
1,392
First Language
Indonesia
Primarily Uses
RMMV
@The Stranger: Thanks! That's a useful reference.

@dbchest: I want to know, where do I have to put this code?
$gameMap.event(this._eventId).direction() === $gamePlayer.reverseDir($gamePlayer.direction());
Do I have to put it inside conditional branch?
Anyway, good luck on making the plugin. I'm looking forward to it :D

@gstv87: Where I can find moveTowardCharacter function?
 
Last edited:

OnslaughtSupply

Ssshhh...
Veteran
Joined
May 14, 2017
Messages
731
Reaction score
764
First Language
English
Primarily Uses
RMMV
Yanfly has this plugin, http://yanfly.moe/2016/06/03/yep-105-event-encounter-aid-rpg-maker-mv/, and in the help file is a list of conditions you can use to check if the player is behind the enemy, to the side of the enemy, or the enemy is facing you. I have a stealth game I am working on as well and I use it for "stealth" takedowns that I use a quick time event plugin so the player has to sneak up behind the badguy and if he's behind him, show choices appears and if takedown is selected, the player has to enter a sequence and he chokes the badguy out. If he either fails to input the sequence or the badguy turns, a battle starts and the battles are hard with extremely limited ammo and health recovery. This makes the player want to sneak and use stealth more than just fighting everything.

For your battle problem make the event, event touch not player touch. Then conditional branches to determine what direction it is facing. Also in the event chase plugin, make sure sight is set or they will always Chase you. Another Yanfly plugin to consider is the move route core. You can setup some pretty good routes that way.
 
Last edited:

LuckyTiger

Villager
Member
Joined
May 12, 2017
Messages
11
Reaction score
6
First Language
English
Primarily Uses
RMMV
You could run a parallel process to check player position in relation to event position, but the plugins mentioned above make it a hell of a lot easier.
 

EpicFILE

Epic Member
Veteran
Joined
Sep 27, 2017
Messages
439
Reaction score
1,392
First Language
Indonesia
Primarily Uses
RMMV
@OnslaughtSupply : Thank you! It works like a charm!

One question still remains, though.
I still can't make the battle event triggers automatically when it stand near me.
Even it stopped precisely 1 tile beside me, I have to actively approach the event before the battle start.

Edit:
Apparently I set up the event with player touch. I set it to event touch and now it works wonderfully.
Thanks for all of you! I'm a happy guy now :D

*the thread can be closed*
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top