- Joined
- Jul 26, 2008
- Messages
- 1,009
JASS:
if GetFloatGameState(GAME_STATE_TIME_OF_DAY) < 6.00 and GetFloatGameState(GAME_STATE_TIME_OF_DAY) > 18.00 then
Alright this isn't working for whatever reason. However, this is:
JASS:
if GetFloatGameState(GAME_STATE_TIME_OF_DAY) >= 6.00 and GetFloatGameState(GAME_STATE_TIME_OF_DAY) <= 18.00 then
So what is the proper setup for the first one?
Whole trigger below:
JASS:
scope VampBurn initializer Init
private function GroupEm takes nothing returns nothing
local integer lvl = GetUnitAbilityLevel(GetEnumUnit(), 'SotH')
local real life = GetWidgetLife(GetEnumUnit())
if not(lvl > 0 and life < (60-15*lvl)) and GetInventoryIndexOfItemTypeBJ(GetEnumUnit(), 'IC10') == 0 then
call SetWidgetLife( GetEnumUnit(), GetWidgetLife(GetEnumUnit()) - (50-15*lvl) )
endif
endfunction
private function Actions takes nothing returns nothing
if GetFloatGameState(GAME_STATE_TIME_OF_DAY) >= 6.00 and GetFloatGameState(GAME_STATE_TIME_OF_DAY) <= 18.00 then
set bj_groupAddGroupDest = udg_BurnGroup
call ForGroup(udg_RoamingGroup, function GroupAddGroupEnum)
endif
if GetFloatGameState(GAME_STATE_TIME_OF_DAY) < 6.00 and GetFloatGameState(GAME_STATE_TIME_OF_DAY) > 18.00 then
call BJDebugMsg("TEST")
set bj_groupRemoveGroupDest = udg_BurnGroup
call ForGroup(udg_RoamingGroup, function GroupRemoveGroupEnum)
endif
call ForGroup( udg_BurnGroup, function GroupEm )
endfunction
//===========================================================================
public function Init takes nothing returns nothing
local timer tim = NewTimer()
call TimerStart(tim, 0.5, true, function Actions )
endfunction
endscope