MV Weeping Angel type enemy (Resolved)

I'm looking for a plugin that will make enemies move towards the player when not being looked at, essentially just like Weeping Angels from Dr. Who. I've tried eventing using conditional branches but the results have been janky and inconsistent, and I've been looking for plugins for a while now and while other people have asked for similar things in the past, the only ones I can seem to find that would accomplish what I need are for VX Ace. If anyone could write something up I'd be eternally grateful, or if someone knows a plugin that already exists or a mixture of plugins that could accomplish this and point me in the right direction that works too. Thanks guys!

-If it could be activated on an event by a Comment or Script Command that would be best and easiest to implement with Chrono engine I believe.
Let's think. The Player can only face 4 directions which ⬆⬇⬅➡ which correspond to 8,2,4,6 on the number pad.

So, something like
JavaScript:
switch ($gamePlayer.direction()) {
    case 8: //when player is facing up
            //change event page if Player is below Event
        if ($gamePlayer.y > $gameMap._events[this._eventId].y){$gameSelfSwitches.setValue([this._mapId, this._eventId, "A"],true)};
        break;
    case 2: //when player is facing down
            //change event page if Player is above than Event
        if ($gamePlayer.y < ...
        break;
    case 4: //when player is facing right
            //change event page if Player is left of event
        if ($gamePlayer.x > ...
        break;
    case 6: //when player is facing left
        break;

I'm not going to write the whole thing out.
You can put that in the Weeping Angel event as a parallel process. It'll turn selfswitch A on, and switch to another event page. Presumably with no movement, and a similar script with reversed logic to turn the switch off once the player looks away

You can also compress this to a single line like
switch ($gamePlayer.direction()) {case 8:if ($gamePlayer.y > $gameMap._events[this._eventId].y){$gameSelfSwitches.setValue([this._mapId, this._eventId, "A"],true)};break;}
And use that as a script in the Angel's Move Route rather than the event command.
That way you can have the event do some other command with a touch trigger, rather than parallel process. But you'll want the event frequency set to "highest".
Thanks for the kickstart! I have absolutely no experience with coding (yet) but I'll try my best to reverse engineer the reverse script.
I'll try my best to reverse engineer the reverse script.
You don't need to...the Conditional Branch event command's third tab allows you to check for a character's facing, including the player and This Event.

So everything coyote wrote out could be represented with event commands (and I'm not even sure why you might need different event pages, if the result of the conditionals is simply to move the event one tile toward the player).

The real question is why you feel you need a plugin for it - if you've tried events with janky and inconsistent results, you'd do better to post those events and get help, because there's no reason they shouldn't work.
You don't need to...the Conditional Branch event command's third tab allows you to check for a character's facing, including the player and This Event.
I hadn't looked at the script in engine yet as I'm at work, but from what Coyote said I thought I would need another script since they said I would need a similar script with reverse logic. If I don't need to then that's great.

The real question is why you feel you need a plugin for it - if you've tried events with janky and inconsistent results, you'd do better to post those events and get help, because there's no reason they shouldn't work.
The reason I ditched evented conditional branches is because they don't play well with with MOGS Chrono engine in ABS mode and quickly become much more complicated and convoluted. I believe a clean backend script would be much more preferable and easy to work with.
I hadn't looked at the script in engine yet as I'm at work, but from what Coyote said I thought I would need another script since they said I would need a similar script with reverse logic. If I don't need to then that's great.
You might not know the coding, but you can formulate the logic 🙂

If you're to my left and not facing right
OR
If you're to my up and not facing down
OR
If you're to my down and not facing up
OR
if you're to my right and not facing left
-- I move toward you.

Could be done in one if statement, certainly one page. I don't see how using multiple pages or any switches benefits you. Simply have that one check with the one movement command, run it every second or however frequently you want.
I was imagining the weeping angel event as having 2 states, therefore 2 pages. Probably 2 graphics. 2 different event triggers.
One where they're moving towards the player while the player's back is turned
Another when they are frozen while the player is facing their general direction.

Assuming the player has some extra movement control, like holding shift to maintain their direction.
I imagine the player could go up to it while frozen and press the action button to do something. Or, while they're not looking the Angel would touch the player and do whatever.
I was imagining the weeping angel event as having 2 states, therefore 2 pages. Probably 2 graphics. 2 different event triggers.
One where they're moving towards the player while the player's back is turned
Another when they are frozen while the player is facing their general direction.

Assuming the player has some extra movement control, like holding shift to maintain their direction.
I imagine the player could go up to it while frozen and press the action button to do something. Or, while they're not looking the Angel would touch the player and do whatever.
That is exactly what the event is supposed to do yeah. I'm still working on it, making slow but steady progress.
For those that may want them.
I was imagining the weeping angel event as having...2 graphics. 2 different event triggers.
That makes sense, I didn't get that implication from the OP.
That makes sense, I didn't get that implication from the OP.
Sorry, I only said Weeping Angel without explaining it further. Thought you might of known what I meant since you jumped in, my bad. All good and working now though.
@Somnus as you used to, I alter the code and combine the 2 into 1 for you.
which does the same effect, but cleaner in it's way.

there was also 2 mistakes with an extra "}" which break the plugin as well
when you want to run it.
@Somnus as you used to, I alter the code and combine the 2 into 1 for you.
which does the same effect, but cleaner in it's way.

there was also 2 mistakes with an extra "}" which break the plugin as well
when you want to run it.
Thank you!
it can be cleaner, but that, I'm not entirely sure, not even the exact effect for it.
but I would love to see a gif of the desire effect as I dont know the game either.

if this solved your problem, report your post to be closed, else we try to help
further to what you seek 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/weeping-angel-type-enemy-resolved.150316/