NPC movements questions

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Hi everyone,
So I'm having some NPC walking around on specific paths. However they also happened to have a secondary page when some event occurs.
My issue is that when they come back to the first page after the event they restart their movement from the start, meaning if they already moved 3 steps down they are gonna do it again and then move out of their original paths.
1596898445887.png

To fix that I tried using some pathfinding plugins, however I found that having multiple NPC walking around on a pathfinding is very heavy for the game and makes some lags.

So is there an other method ?


And on an other topic, is it possible to have them trigger a touch event when they touch the player (they are parallel event already so I can't have both) ? Basically what I want if that if they bump in the player they have a reaction, so maybe something that checks the distance with player ? Any ideas ?
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
857
Reaction score
542
First Language
English
Primarily Uses
RMMV
Why do you need them to be parallel processes, rather than just "on event touch" triggers with a normal patrol route? I feel like you might be making the problem more complicated than it needs to be.

Depending on what you actually need to do, there should be a number of ways to solve it without adding a bunch of plugins.
 
  • Like
Reactions: Bex

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Why do you need them to be parallel processes, rather than just "on event touch" triggers with a normal patrol route? I feel like you might be making the problem more complicated than it needs to be.

Depending on what you actually need to do, there should be a number of ways to solve it without adding a bunch of plugins.
It doesn't work because I have many other thing than just the move route happening in my event.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Can you show Eventpage 2 and 3 of your Guard NPC?
Maybe that helps.
 

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Page two is this : 1596966763666.png

Page 3 is gone (it was just a blank page where I tried something).

Basically my Guard guy is walking around and I'm using a plugin on the first page that when he sees my player, self switch A turns on. And I use Galv's map projectile so when I hit Guard with a projectile, self switch B turns on.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Ok i dont understand the details of the Code, but i can tell that we can change the structure to make
this work on 1 Eventpage.

Pseudocode Eventpage1:

Conditional Branch If Self Switch C is On
If Yes: Here insert the Code from Page2
else: Here insert the Code from Page 1

Thatway you just have 1 Eventpage and your Moveroute should be fixed.
 

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
That would work indeed, however the reason I was using a second page is so that I could have a different sprite (I will make it later) for the guard when he is hit. Or is there maybe a way to call a sprite with a script or something else ? That way I could indeed just use 1 page and resolve my issue.
 

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

Latest Threads

Latest Profile Posts

I've been trying out Fell Seal: Arbiter's Mark, and it has an interesting approach to consumable items - you get a limited inventory that is automatically refreshed to max limits (1 or 2 each, craft to expand + improve effect) at the start of each combat. It's a mechanic that goes against the common urge to hoard consumables.
Degica has discounts on Humble for games and older Makers. I don't know which A-train to choose. :-D
Hey, uh...refresh my memory. What do i do if I want a thread I made deleted?

Forum statistics

Threads
103,194
Messages
997,917
Members
134,667
Latest member
SardonicReserve
Top