[Changed] Tweaked the ai decision tree slightly.
This commit is contained in:
parent
413f192878
commit
e758e541f1
@ -23,7 +23,13 @@ function control()
|
||||
|
||||
-- Get new task.
|
||||
if task == "none" then
|
||||
-- We'll first check enemy.
|
||||
if enemy ~= nil and aggressive then
|
||||
taunt(enemy, true)
|
||||
ai.pushtask(0, "attack", enemy)
|
||||
else
|
||||
idle()
|
||||
end
|
||||
|
||||
-- Think for attacking.
|
||||
elseif task == "attack" then
|
||||
|
Loading…
Reference in New Issue
Block a user