[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.
|
-- Get new task.
|
||||||
if task == "none" then
|
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()
|
idle()
|
||||||
|
end
|
||||||
|
|
||||||
-- Think for attacking.
|
-- Think for attacking.
|
||||||
elseif task == "attack" then
|
elseif task == "attack" then
|
||||||
|
Loading…
Reference in New Issue
Block a user