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
852
Reaction score
536
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 Posts

Latest Profile Posts

I started really going in on my project April of last year... I'm just now making starting the actual game... making assets (and not even all of them), whoooo... TIME SINK.


Imagine being a pleb and using --------------------.js :LZSwink:
Ami
--- Survival For RPGist Part 2 ---

Survivalist: Now,I going to Test you: Fishing with Spear
M.Spear Knight: Leave it to me.
(M.Spear Knight Spearing the Fish with His Battle Spear)
M.Spear Knight: How it is?
Survivalist: I know you did it,but...Is that the Spear for Battle,not for Fishing?
M.Spear Knight: But,is that same?
Survivalist: (Sigh)...Whatever

Forum statistics

Threads
102,943
Messages
996,172
Members
134,408
Latest member
SosukeTheBro
Top