Mrvideogame

AI assist

Jan 15th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. <TheMadman> In other news, WayofTime and I have been coming up with ideas for bosses and events. Problem we currently face is working out how to have a tile entity give "Orders" to mobs.
  2. <Emoniph> that's easy
  3. <TheMadman> We might have missed something, then...
  4. <TheMadman> Needless to say, we are working this out as we go along.
  5. <Emoniph> depends alot on how tightly you want the TE to connect with the mobs
  6. <Emoniph> i.e. does the TE own the mob, or does it acquire the mob. Can the mob become detactched from the TE? etc.
  7. <TheMadman> The idea is to have the TE coordinate the mobs, so they can do things like move into a formation and attack the player at the same time.
  8. <Emoniph> Write an AI that coordinates with the TE for instructions
  9. <Emoniph> the TE is at fixed coords so this must be saved with the mob (not in the AI)
  10. <TheMadman> Considering what we have planned, that should be doable.
  11. <Emoniph> Very easy if the TE spawns the mobs BTW, since it can embed its coords during construction
  12. <TheMadman> Right, and it will be spawning them.
  13. <Emoniph> as the various AI parts kick in (you use the exclusivity flags to ensure only relevant stuff activates at a time) it can just check with the coordinator TE what to do and if a given AI should activate
  14. * TheMadman nods
  15. <Emoniph> As MOBS report in, subsequent mobs can be given similar tasks
  16. <Emoniph> so mob1 AI shouldActivate asks TE, te says yes and to target player in area xyz
  17. <Emoniph> records it has given this command
  18. <Emoniph> if second mob reports in for instruction, TE can send it in the same direction (up to a limit for a given target if you like)
  19. <Emoniph> I would not spend too much time on formations, more an swarms
  20. <Emoniph> if you must do formations, the TE should designate the first entity as the "leader" and then subsequent mobs shold be given that leader and then an AI should kick in to maintain a specific distance from leader (before the ATTACK AI activates)
  21. <TheMadman> I'd say have them coordinated enough not be bunched together for one explosive attack wipes them out, and so they don't block each other's shots.
  22. <Emoniph> Make there shots no collide for entities of the same type (easiest option)
  23. <Emoniph> or just send the shots in a arc oven their friends heads (way is good with maths)
  24. <Emoniph> BTW: vanilla villages mught be getting a little larger in future... http://imgur.com/BUaXBUb
  25. <TheMadman> This should be enough to get us further, so thank you for your time and advice.
  26. <Emoniph> no probs, always available to help out
Advertisement
Add Comment
Please, Sign In to add comment