Problem description: So I have no code examples for this it's more of a what would be the best way? For example I have mobs 1, 2 and 3 who are all of the same type but I want 1 to walk to point A, 2 to point B and 3 to point C.
I don't want to have to create multiple NPC's of the same type to walk in different lanes. So I'm wondering what would be the best way to do that?
ID:2310682
Oct 31 2017, 4:11 pm
|
|
I don't want to have to create multiple NPC's of the same type to walk in different lanes. So I'm wondering what would be the best way to do that? The best way is probably one of the easier ways. I'm going to assume you are doing tile movement. For pixel movement, this is gonna be a lot harder. mob Basically, the gist of this idea is that you place obj/lane_node markers down on the map. Set the lane_node direction to the direction you want the enemy laners to move in starting at that point. When they step on the lane_node, they will change direction, wait for their current glide to end, then start moving in the new direction. Just manually place down direction markers everywhere the enemies need to change directions. #VVV############# # ###> V# # ### > V # # ### > V # # > ^ ### # # > ^ ### # #> ^### # ############# # |
Thanks Ter, sorry I took so long to reply. This helps a lot, I had something similar to this but I was using loops instead and it was causing a few problems. Although the nodes you made we're similar to mine except for some reason, when I used Crossed() I couldn't get it work. Possibly because I was using Crossed(atom/movable/m)? I'm not sure.
I tried to check out pathing libraries before I came here but they all just seemed over complicated for my needs. A quick question as well, the line set waitfor = 0. I'm assuming since we're not defining this as a variable this is inbuilt in DS? I couldn't find anything in the reference really. |
It's not in the reference anymore since it's technically 'obsolete'. It's in the Redbook though.
|
It's technically 'obsolete', as it was replaced with spawn, but I prefer it over spawn even though it's negligibly slower due to invocation overhead.
It gives you a better overview of how much time your code takes in the CPU profiler, because it better segments your code. It's basically a proc setting that tells the engine to return to the calling proc when encountering a sleep while allowing the proc to pick up on its own later. |
The instance hoster can be the dedicated, or the room owner, or one of the players of that match
shell proc