Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Onnyola

How to Make a City Alive

Question

Okay,

I have a large city where I want NPCs to randomly appear and walk along the streets and vanish into buildings.

 

So far I've tried to have a parallel event that makes a variable go to a random number then has a wait on it so that the NPC can get to their end point. When the variable matches the condition set to a NPC's event that NPC walks along a custom route then vanishes.

 

 

My problem is this:

When the player hangs out in the area and the variable hits a number it has already done the NPC appear in the vanished location not the start point! How do I fix that?

 

I know I can make them invisible then have them walk back along the route. I'd really rather not do this as I will have to bump up the wait time on the parallel. Doing that would make an even LONGER wait time between NPC walking around. This town is supposed to be super busy- think New York City busy.

 

Is there a way, perhaps, that is easier than what I'm doing? I want it to be totally random, if possible. Or, at the least, a way to overcome the appearing in the wrong spot?

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Okay,

I have a large city where I want NPCs to randomly appear and walk along the streets and vanish into buildings.

 

So far I've tried to have a parallel event that makes a variable go to a random number then has a wait on it so that the NPC can get to their end point. When the variable matches the condition set to a NPC's event that NPC walks along a custom route then vanishes.

 

 

My problem is this:

When the player hangs out in the area and the variable hits a number it has already done the NPC appear in the vanished location not the start point! How do I fix that?

 

I know I can make them invisible then have them walk back along the route. I'd really rather not do this as I will have to bump up the wait time on the parallel. Doing that would make an even LONGER wait time between NPC walking around. This town is supposed to be super busy- think New York City busy.

 

Is there a way, perhaps, that is easier than what I'm doing? I want it to be totally random, if possible. Or, at the least, a way to overcome the appearing in the wrong spot?

Can you please post some screenshots of the event or try to explain this a little better. I'm confused because are they walking around randomly? Or is everything custom?

Share this post


Link to post
Share on other sites
  • 0

Just a second and I'll upload a demo... that would be easiest.

 

I'll try to explain more though.

I have each NPC set as an event with a custom route. Then I have the condition for the events to appear to be a variable. Each NPC has a different number of the variable. NPC 1 needs the variable to be -1. NPC 2 needs it to be 0, etc.

 

At the same time I have a parallel event that makes the variable change randomly. After it changes the variable it's set to wait for a while so that the NPCs have time to get to the end of their route. Once the wait is over it loops back and randomly changes the variable again thus making the NPCs appear randomly walking through town.

Edited by Onnyola

Share this post


Link to post
Share on other sites
  • 0

Demo

 

It's not my actual project but you get the same problem and you can see how I'm doing it.

Share this post


Link to post
Share on other sites
  • 0

Its an easy fix

after the event command that makes the event become invisible

insert a Set Event Location command (teleports event like teleports player)

and set it to the original position

 

btw. Its right next to the player teleport command

Edited by Enigma

Share this post


Link to post
Share on other sites
  • 0

Its an easy fix

after the event command that makes the event become invisible

insert a Set Event Location command (teleports event like teleports player)

and set it to the original position

 

btw. Its right next to the player teleport command

Yea that will fix it but there is still one problem lol. I dont know why that switch I have is affecting 3 people when its set to one. But half the time it works when I place a switch in then on the next page set the location of that event. The other half the 3 different people just straight out disappear with no movement which is really weird because why is one switch affecting 3 people when its set to only affect 1. I suppose you could set the conditional branch to hit the same number as the that event then when it does set the event location

Edited by Dragon324

Share this post


Link to post
Share on other sites
  • 0

 

My problem is this:

When the player hangs out in the area and the variable hits a number it has already done the NPC appear in the vanished location not the start point! How do I fix that?

 

I know I can make them invisible then have them walk back along the route. I'd really rather not do this as I will have to bump up the wait time on the parallel. Doing that would make an even LONGER wait time between NPC walking around. This town is supposed to be super busy- think New York City busy.

 

Is there a way, perhaps, that is easier than what I'm doing? I want it to be totally random, if possible. Or, at the least, a way to overcome the appearing in the wrong spot?

 

I believe what you need to do is put the command 'Set Event Location' it is on page two of event commands. By using that command and putting it before your walk pattern starts or is called to start, you should be able to return each event back to its desired location. This way when the same number is called the event can be returned to its original starting location.

 

Is this what you were looking for?

*EDITE* beat me by my spell check haha

Edited by Jon Bon

Share this post


Link to post
Share on other sites
  • 0

Perhaps I'm not seeing it?

I'm using the custom movement thing on the NPC event. Could you tell me where on that menu the move event is?

 

 

EDIT: Replied while I posted!

 

I'm not using the event commands. If I do that I would have to make all the NPC events parallel and then I would have a lot of lag.

Edited by Onnyola

Share this post


Link to post
Share on other sites
  • 0

Perhaps I'm not seeing it?

I'm using the custom movement thing on the NPC event. Could you tell me where on that menu the move event is?

It is not located there. You will need to use it as a separate command, most likely in your parallel process event. Possibly use it right after your wait, add a 1 second wait and put the commands(1 for each npc event) between the last waits.

Share this post


Link to post
Share on other sites
  • 0

Oh, yeah, I didn't think about putting it into the one parallel. That would work, for sure. I'm so brain dead today!

Thanks!

Share this post


Link to post
Share on other sites
  • 0

Oh, yeah, I didn't think about putting it into the one parallel. That would work, for sure. I'm so brain dead today!

Thanks!

 

No problem!

 

I have been tinkering with your same idea in my head for a while now, I am glad to see it will work. You helped me finalize my thoughts on it ha ha.

Cheers.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...