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
869
Reaction score
553
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 think I've got my hero designs pretty much finialised ( still got some tweaks. ) In the end it'll be the four outfit colour variants with four different skintones.

I'm a bit conflicted. One the one hand, it's quite visually cool to make bodies of water that the player can interact with by going into it. However obscuring the player character from a gameplay perspective is pretty bad. Hmm... There's the option to make the area around the player visible, but then that kind of defeats the purpose of submerging them. :unsure:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Another two plugins done! One being an on map grid inventory.
busy with my newborn child, can't even touch pc at all ;_;

Forum statistics

Threads
104,297
Messages
1,005,351
Members
135,812
Latest member
Yagyu_Chan
Top