I was wondering if there's any way to limit a combatants movement range per turn in combat to max out based on a formula and then stop them if they exceed that range. Also, it it possible to instruct a a combatant either to move a certain distance in a direction based on the results of a formula, or to stop them at a certain distance from a target based on such results?

Second, is there a way to run a check loop while a combatant moves that will check distanced moved to stop it, and possibly alter a variable based on this distance rather than just using time and speed as the medium for determining things like Action Points cost?
  • Are you using grid? by distance do you mean grid range?
    Or more like Divinity controls?
  • Divinity would be a good example of what I'm looking to achieve. My combat is a mixture of ATB and turnbase, and I'm trying to set everything to work by mouse with an option to use keys as well. At the moment, I just have an event that instructs the attacker to move to a target before attacking as part of the attack ability animations string, and it also loops at intervals to check whether they're still moving to determine whether additional action points will be subtracted after the attack ends. Those intervals are time based, though, so it's not really an accurate measure of the actual distance traveled.

    I'd like to provide a separate move option for movement that isn't linked to an ability, but I also want to block the controls to prevent free roaming around the map. I think one way to achieve this would be to unblock controls during a combatant's turn, but prevent them from moving outside of a certain radius that a stat or formula would determine. I also need to figure out how to unlink my base attack from a combat menu so that it will launch directly by clicking on a hostile combatant rather than requiring a menu selection to trigger the event.
  • Hm, why don't you calculate distance between two characters and how much AP that would take beforehand? Even if you use navmesh, it should be possible to get the distance it takes to get to enemy. Example You could write custom ORK action for that.

    For base attack to work by hovering mouse on enemy I hacked together this monstrosity for my game :D
    I also want character to switch to movement as default action, so I had to do some additional checks along with that code running in update.
    and I think I also had to edit source code to add AbilityCanceled notification.
  • Yeah, I can check for the distance to an enemy but I can't see how to access it directly. The only way I know how to do it at the moment is set up a sequence of nodes that check to see if the distance between 'x' and 'y' is greater than 'z', and have it go down the line until that isn't true anymore. I was hoping there might be a built in solution for this. Mouse navigation during combat is, after all, a fundamental staple of CRPG's, as is a fully point and click UI, but thanks for the code there. Strange that such a shortfall wouldn't have already been addressed, if indeed ORK isn't capable of it straight out of the box. Is there no built in solution at all, even using Makinom?
  • The next update will have a node to store the distance between 2 game objects in a float game variable for further use :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.