![]() |
Quote:
Example: you have a road between two towns. A NPC gets distracted by a bunny and gets lead of the road a bit. The NPC only needs to A* (if necessary) to get onto the nearest node on the road. Once on he is set. Can use a quick tool online to put all these node paths in easily enough. Depending on the realism you want, may need the occasional diversion around a player /object but other than that it's nice enough. |
Interesting! Pardon me, but I have a noob question...
how difficult would it be to have an 'if interrupted on the path' condition? The guy plots out the path, the guy tries to move along the path, and if for some reason he's blocked along the way, he takes a certain action? |
Quote:
|
Don't disregard my post actually! Lol. For some reason, when I try to make an NPC move, it always returns error: blocking, no matter the x/y input or it's origin x/y.. Anyone know the cause of this? Could it be because I'm trying to place it on a gmap? Also, it doesn't only work with pics1 type tiles, does it.. ?
Come to the conclusion that it's neither of the things I mentioned. Anything else it could be.. ? Posting my class code for reference: PHP Code:
|
You need to configure either newtilesetlevels or newtilesets in serveroptions to let the server know which levels are using type 1 tiles.
|
Quote:
|
Quote:
PHP Code:
|
Oh okayy.. well played good sir! But, apparently this is not the problem as the NPC is still returning "Error: Blocking!"
|
Quote:
|
You should use A* with waypoints and a navigation mesh instead of tiles, it's less intensive and looks better, although it creates some manual labor for the person creating the level. Maybe you could fall back to tiles if there are no waypoints in the area.
|
awesome xx
|
All times are GMT +2. The time now is 12:41 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.