Script Request - Making NPCs (cars or such) follow region IDs

● ARCHIVED · READ-ONLY
Started by Jaskeri 5 posts View original ↗
  1. Hey! So, I've been building this rather big city with Ace, with roads and pavements and all that is left is to fill it with life. So I managed (with another script) to restrict NPCs (in this case, people) to move randomly on a region ID, so like on pavements and so on, but only randomly, so this doesn't work with cars and other vehicle-looking-eventNPCs that I'd like to drive around on the streets.

    Naturally, this could be done by using Move Route, but to create a route so big that it feels natural (meaning that you wouldn't really notice the same car going around the block again and again) is a real pain, especially if I'd like to have one or more cars. This would, in addition, take immersive amounts of planning and so on. I've tried pathfinders and all, but they really didn't deliver what I was hoping :/

    And because I didn't find any other script that could do this, I was hoping if any of you skilled scripters out there could possibly help me with this? 'Cause basically what I need is a script that would make an event (that would play out as an NPC, with a car graphic) follow a route drawn on the map with region IDs, so not just stick to the region ID but to go forward on it and use it as a trail!

    I imagine that this would make more structured feel to cities built with Ace, like having a bus go on a specific route or having lots of cars come and go on their own trails drawn with region ID to really make that immersive feel of a real city. 

    And of course releasing everyone who wishes this from creating horridly big routes with Move Route. Maybe adding a script in the events Autonomus Movement that says something like follow_region_id_x or you get the twist?

    Hope I wasn't too confusing o:
  2. The problem is that region codes alone won't work - for example, if you have a line of region ID's, how does the event knows that it should go right or left?


    One solution would be to use directional passability, that would work even without script - but it will also restrict the player if he gets on those tiles. Another option would be Yanfly's Force Move script, but that will only work for the player, not for events.
  3. Hey, thanks for the quick answer- you're propably right, I hadn't thought about that. 

    Would it work with region IDs if you made the line like a circle instead? So that there'd be no choice of left or right, just forward? I attached sort of a examplepictureorsomething... but if not, then I guess it's more complicated than I figured :D

    But thanks for the tip, I'll look into it!

    example.png
  4. So it wouldn't work? Even if different region IDs for every direction? There's just no way? D:
  5. It seems like it might be fairly easy if you did a straight line of regions to indicate lane direction, for instance:

    [3][3][3][3][3][3][3][3][3][3][3][3][3][3][3]   (cars go left)

    ------------------------------------------------

    [4][4][4][4][4][4][4][4][4][4][4][4][4][4][4]   (cars go right)

    And then they would just go off the screen or something.  I don't know how exactly you're intending to use them though.