@GilHaven't dug into this yet from a code standpoint. I was wondering if the systems were exposed within the API to possible do this:
Instead of creating the pre-structured troops (except for specific encounters), I'd like to assign some combatants to a list and have the system generate a troop when spawner activates in-game.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
blindmonkeygames.com/index.html
I set the moveAI for the combatant within the editor; but, that overwrote the AIs set for existing ORK spawners (not removing those).
I saw MoveAISettings and Components within the framework. Check tutorials, just in case.
What's the best method for setting a move AI via script - haven't searched forums, yet. I'm doing that next.
blindmonkeygames.com/index.html
Once you've got the component, you can change the used move AI via:
moveAI.ChangeMoveAI(id);
id is the ID/index of the move AI.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'll see what I can do with that.
blindmonkeygames.com/index.html
Mob still not moving. Dug into the framework source to understand a bit more. The CanUse() function of the MoveAIComponent is returning false. I think it is Battle.CanUseMoveAI() call that returns false. The MoveAI component of the combatant is null to start - not assigned in the editor. I've been using the ORK spawner to assign a move AI since I didn't want all the mobs moving. Wanted some to remain stationary.
So, I used the following to add a moveAI component
MoveAIComponent m = c.MoveAI; //this returns null
//used this method to add the move ai component
m = ORK.MoveAIs.Get(0).AddAIMover(c); //start with default mover to make sure it gets added okay
m.ChangeMoveAI(moveAIID); //change to desire moveAI - simple random wander
m.blocked = false; //make sure this isn't blocking
Am I useing the AddAIMover function incorrectly?
Thanks as always
blindmonkeygames.com/index.html
Still would like to understand why initial approach wasn't working as expected, though :)
blindmonkeygames.com/index.html
That resulted in the change to work successfully.
blindmonkeygames.com/index.html
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
blindmonkeygames.com/index.html