With the pathfinding system you are able to create
A waypoint exists of coordinates of a specific location where a unit needs to move to. A waypoint basically is a checkpoint. The unit follows a route which is outlined by a number of waypoints. Let's say there are four waypoints: A, B, C and D. A unit can walk in three different routes:
You only have to create a route once which you can give an appropiate name. You can give the route to any number of units you want and they will start following it. The aggro range determines how far the unit will chase an enemy unit before giving up. When the unit starts to attack an enemy unit, the unit's position will be stored into a variable. If the unit's aggro range is set on 30 meters and the unit walks more than 30 meters away from that position, the unit will give up the fight and move back to the position where he launched the attack. Once he's reached that position, he will continue moving towards the next waypoint. The same theory applies when the unit has lost sight of the enemy unit(s). Accuracy determines how long a unit needs to wait before he continues to move towards the next waypoint after having given up a fight (see Aggro Range). Accuracy had to be implemented to fix a bug (the pathfinding system looks at the unit's action ids to determine if a unit is attacking something or not. Action ids have a little delay before they're updated. So what happened is that the system thinks the unit has stopped attacking and tries to send it towards the next waypoint while the unit actually still wanted to attack an enemy unit). |
This effect marks the unit as alive or dead. Dead units are ignored by the pathfinding system. Source Unit: The unit with pathfinding. Alive (true/false): Marks the unit as alive or dead. This effect adds an unit to the pathfinding system. Dead units are ignored by the pathfinding system. Source Unit: The unit with pathfinding. Patrols (true/false): Marks if the unit needs to patrol on the waypoints. Route ABCA (true/false): Determines if the unit needs to follow the route in ABCA order (true) or ABCBA order (false). Attack Move: The unit will attack enemy units on sight if enabled. Waypoint radius: Determines how close the unit needs to get to a waypoint before he can proceed towards the next one. Aggro range: Sets unit's aggro range in meters. Return after attack (true/false): Determines if the unit will return to the location he launched the attack from or if he will immediately proceed towards the next waypoint after having attacked an enemy unit. This effect creates waypoints that plan out a route. New Waypoints (true/false): Is this a new route? Waypoints Name: The route name. Waypoint 1-5: Set the waypoints to your liking. This effect binds a route to the unit that he will start to follow. Source Unit: The unit with pathfinding. Waypoints Name: The route name. This effect handles all unit movement commands. Accuracy: Determines how long a unit needs to wait before he continues to move towards the next waypoint after having given up a fight. |
What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey. Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers. Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%] [This message has been edited by Lewonas (edited 01-05-2014 @ 06:01 AM).] Author Replies:
Lewonas
Mortal
posted 31 December 2013 06:06 PM
EDT (US)
1 / 14
I just wanted to share this cool little system with you guys. What do you think about it? How would you improve it? Do you have any suggestions? Something else?
Happy new year everyone! What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey. Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers. Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]
Elrich
Hero
posted 31 December 2013 07:36 PM
EDT (US)
2 / 14
This reads as very impressive, Lewonas. I will go over your code next year (tomorrow
I wish you a happy and fruitful new year. Find the blood inside this stone Well, I know I've never shown what I feel, I've always known I plan my vengeance on my own - and I was always alone
Zenophobia
Irrational Fear
Lewonas
Mortal
posted 01 January 2014 07:28 AM
EDT (US)
4 / 14
What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey. Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers. Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]
Nickonhawk
The Narrator
posted 01 January 2014 02:43 PM
EDT (US)
5 / 14
Pretty outstanding :P
Skyrim... the greatest game ever... without considering Age of Mythology, of course! Ctrl...Alt...Q... and Brisingr-know these three things and your task here is accomplished...
pBiggZ
Mortal (id: P_J_B)
Lewonas
Mortal
posted 03 January 2014 04:54 AM
EDT (US)
7 / 14
Yes, they should be online compatible. The game may experience some lag if more than 100 units have to be given movement instructions at the same time on a large map. I / You will need to do a stress test to find out where this limit lies. I'm sure it is pretty high.
I could see alot of world of warcraft style "patrolling mob" applications here.Yeah, sure! I created this system to be somewhat similar to Dota 2's creep movement system. Someone here on the forums needed a movement system like in that game. But yes, it can be used for a lot of different game types. It could definitely be useful in RPG scenarios for what you said and perhaps for bosses as well. You can prevent a boss to be kited around the whole world with this system by setting a limit on the aggro range. Once that limit has been exceeded, the boss will move back and could restore its health to full to reset the boss fight. I will upload the triggers on AoMH in a few hours. What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey. Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers. Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%] [This message has been edited by Lewonas (edited 01-03-2014 @ 04:55 AM).]
pBiggZ
Mortal (id: P_J_B)
Lewonas
Mortal
posted 05 January 2014 06:02 AM
EDT (US)
9 / 14
I have submitted them. Link is in the OP, still awaiting approval though.
What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey. Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers. Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]
candalas
Mortal
Lewonas
Mortal
posted 06 January 2014 05:51 PM
EDT (US)
11 / 14
Great! Have fun with it.
What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey. Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers. Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]
candalas
Mortal
pBiggZ
Mortal (id: P_J_B)
Lewonas
Mortal
posted 18 February 2014 03:27 PM
EDT (US)
14 / 14
What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey. Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers. Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%] Copyright © 1997–2024 HeavenGames LLC. All rights reserved. |