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 Profile Posts



I've been experimenting with improved memory management again, which allowed me to include items to increase player path length. These are both 44 grid spaces long, and stable. :LZSexcite:
I FINALLY DID IT! 5 years making my very first game and I just officially released it on STEAM..... OMG..... I can say I finished a game! The feelings!!!!!
Stream will be live shortly! I am going to be playing some Among Us! Feel free to drop by!
Ami
tv program always get the ratings (it's the reason why drama series has 1000+ episode),also full and nonsense of censorship (weird blur, a scene getting cut because the unconvenient viewer,but it unconvenient to me either. you never see what the original is)

i know the reason is to take cover the viewer from the negative thing,but i just laughing and mocking of them that they're always suck :guffaw:
Star Chart Idea - Just something I am working on.

Forum statistics

Threads
104,460
Messages
1,006,444
Members
135,966
Latest member
Kleik
Top