-
Notifications
You must be signed in to change notification settings - Fork 5
/
think.lua
41 lines (29 loc) · 1.01 KB
/
think.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
-------------------------------------------------------------------------------
--- AUTHOR: Nostrademous
-------------------------------------------------------------------------------
local freqTeamThink = 0.25
local lastTeamThink = -1000.0
local X = {}
function X.MainThink()
-- Exercise TeamThink() at coded frequency
if GameTime() > lastTeamThink then
X.TeamThink()
lastTeamThink = GameTime() + freqTeamThink
end
-- Exercise individual Hero think at every frame (if possible).
-- HeroThink() will check assignments from TeamThink()
-- for that individual Hero that it should perform, if any.
return X.HeroThink()
end
function X.TeamThink()
dbg.myPrint("TeamThink")
end
function X.HeroThink()
dbg.myPrint("HeroThink")
local bot = GetBot()
local highestDesireValue = BOT_MODE_DESIRE_NONE
local highestDesireMode = noneMode
local evaluatedDesireValue = BOT_MODE_DESIRE_NONE
return highestDesireMode, highestDesireValue
end
return X