AI in Lua
#9
Maybe every few ticks, poll all entities and if they're a mob, add their ID to a table, check if the entity of that ID is nil or not, if its not, do routines, and on death, remove their ID from the table?

If there are alot of mobs, it may cause some slowdowns tho, but I doubt it with your i7.
Reply
Thanks given by:


Messages In This Thread
AI in Lua - by wudles - 01-29-2015, 09:26 AM
RE: AI in Lua - by xoft - 01-29-2015, 04:35 PM
RE: AI in Lua - by wudles - 01-29-2015, 04:45 PM
RE: AI in Lua - by xoft - 01-29-2015, 04:48 PM
RE: AI in Lua - by tigerw - 01-30-2015, 08:27 AM
RE: AI in Lua - by wudles - 01-30-2015, 08:36 AM
RE: AI in Lua - by xoft - 01-30-2015, 08:48 AM
RE: AI in Lua - by wudles - 01-31-2015, 03:36 AM
RE: AI in Lua - by DiamondToaster - 02-02-2015, 05:10 AM
RE: AI in Lua - by wudles - 02-02-2015, 05:41 AM
RE: AI in Lua - by DiamondToaster - 02-02-2015, 06:01 AM
RE: AI in Lua - by jsebean - 06-18-2015, 06:35 AM
RE: AI in Lua - by warmist - 06-19-2015, 01:24 AM
RE: AI in Lua - by worktycho - 06-19-2015, 01:27 AM
RE: AI in Lua - by warmist - 06-19-2015, 01:58 AM
RE: AI in Lua - by worktycho - 06-19-2015, 03:18 AM
RE: AI in Lua - by SamJBarney - 06-19-2015, 03:30 AM
RE: AI in Lua - by warmist - 06-19-2015, 03:50 AM
RE: AI in Lua - by SamJBarney - 06-19-2015, 04:01 AM



Users browsing this thread: 3 Guest(s)