Jump to content
Saeryen

NPC is not moving

Recommended Posts

This is the event:

 

13_1.png

 

 

I had the event location set because at first she was close to Maia that it would be waaaay hard to keep her away and not get a Game Over. She's supposed to move toward Maia, but she just stands there. Help please?

Share this post


Link to post
Share on other sites

Is it the repeat on move event?  Does it need a loop instead?

Edited by xoferew

Share this post


Link to post
Share on other sites

Instead of 'move_toward_event(x), try 'move_toward_character($game_map.events[x])'  Honestly, I tried yours and it gave me an error when I entered the map with the event in question, so I don't know how you're even running it to verify that it's not making her move.

Share this post


Link to post
Share on other sites

The move_toward_event was part of a downloaded script that worked before...

 

What's the difference between repeat and loop?

Share this post


Link to post
Share on other sites

This looks like maybe it never gets to your touch check?

S4rTwzL.png

I would think a loop would run one movement, then check if touch has occurred, and then if yes break the loop and if no repeat.

But I am no move route expert.

A loop would be like this, only with your touch check instead of adding to a variable.

dcQqtFH.png

Share this post


Link to post
Share on other sites

Okay, I tried devonm0's suggestion but the problem is still there. I think I should add that when I hit one of them, the others that haven't been hit start moving but they stop after the text reaction (the character hit speaks) they all teleport back to their beginning positions and are still.

 

And during the character's speech, another guard could touch Maia, but that doesn't trigger Maia saying "Nooooo!" and then a game over when it should.

Share this post


Link to post
Share on other sites

I believe I'm understanding this correctly. You basically want the guard to chase after her and if they catch her you want it to be a game over? Jonnie91 and I did something similar with Slenderman's Army, let me take a look at the events and see if I can get you a screen shot.

 

Edit: Okay I figured out how to do this for you and it is rather simple. The first thing you are going to need is an ongoing common event that constant sets two variables. Player X and Player Y. Each of these events should always match the players map X and players Map Y.

 

Secondly you can trigger the guard chase however you want. I did so by creating two more variables Guard X and Guard Y and set a self switch to trigger when the Player X matches the Guard X.

 

chase%20one_zpstlk64e02.png

 

Secondly I made a custom move event on the second page, simply 'move towards player' I also increased the speed to 'normal' to make it a bit more intense. One other thing you may notice by the screen shot below that I set the priority of this event to 'above player' The reason for that is so that the conditional branch events can actually happen. Basically you will need the guard to physically be on the same exact spot as the player in order to 'grab' them. As you can see even this event does not require much as it is simply constantly checking to make sure that both the Player X and Player Y match up with the Guard X and  Guard Y variables.

 

chase%202_zpsvabg9iir.png

 

I hope this solves your problem.

Edited by Shaddow

Share this post


Link to post
Share on other sites

Thank you, I will try that!

 

EDIT: It worked! Thank you so much!

Edited by saeryensong

Share this post


Link to post
Share on other sites

I'm gonna jump in here just to say, that event was co-created by Phillip (from RRR) he's still around in the community so do try to credit him, as well as Shaddow :) 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted