- Joined
- Jun 9, 2020
- Messages
- 278
I'VE FOUD IT, BRUH!!! Just launch your World Editor with no map. Than go "File" -> "Preferences" -> "Asset mode" -> "SD" After that you should be able to see your maps with the classic graphics... At least...Ok how?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I'VE FOUD IT, BRUH!!! Just launch your World Editor with no map. Than go "File" -> "Preferences" -> "Asset mode" -> "SD" After that you should be able to see your maps with the classic graphics... At least...Ok how?
The interpreter is instant. Simulation time is paused while it is executing. Execution order is well defined for network synchronisation purposes.Since the interpreter is not instant, sometimes the script will trigger properly on an alive unit, but during its execution a unit becomes dead.
Do I really need to prove myself?The interpreter is instant. Simulation time is paused while it is executing. Execution order is well defined for network synchronisation purposes.
function Trig_Spell_BARB_Battle_Cry_Actions takes nothing returns nothing
local integer ilevel
local unit ucurr
local unit utarget = GetSpellTargetUnit()
local player powner
local location lpoint = GetUnitLoc( utarget )
local group gunits = GetUnitsInRangeOfLocAll(300.00, lpoint)
// Auto caster for the defense lowering ability
loop
set ucurr = FirstOfGroup(gunits)
exitwhen ucurr == null
call GroupRemoveUnit( gunits, ucurr )
set powner = GetOwningPlayer( ucurr )
if ( ( powner == Player(11 - 1) ) or ( powner == Player(12 - 1) ) ) then
// ! it's very important to check if unit is alive ! crashes otherwise
if ( IsUnitAliveBJ( ucurr ) ) then
set ilevel = GetUnitAbilityLevel( ucurr, 'A01N' )
if ( ilevel == 0 ) then
call UnitAddAbility( ucurr, 'A01N' )
elseif ( ilevel < 5 ) then
call IncUnitAbilityLevel( ucurr, 'A01N' )
endif
endif
endif
endloop
call RemoveLocation( lpoint )
call DestroyGroup( gunits )
call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
// clean up local variable pointers
set lpoint = null
set gunits = null
set powner = null
set utarget = null
set ucurr = null
endfunction
function Trig_Spell_BARB_Battle_Cry_Conditions takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'h005' )
endfunction
//===========================================================================
function InitTrig_Spell_BARB_Battle_Cry takes nothing returns nothing
set gg_trg_Spell_BARB_Battle_Cry = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(0), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(1), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(2), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(3), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(4), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(5), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(6), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Spell_BARB_Battle_Cry, Player(7), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Spell_BARB_Battle_Cry, Condition( function Trig_Spell_BARB_Battle_Cry_Conditions ) )
call TriggerAddAction( gg_trg_Spell_BARB_Battle_Cry, function Trig_Spell_BARB_Battle_Cry_Actions )
endfunction
I ran into this problem extensively. It gave me such a hard time because it was extremely hard to pin point. I set a Tavern building with no pathing Ai so that they could be set closer to each other and take up less space (dockyard and smaller building Ai works best). If you set it to none, the game plays fine without Ai. If you have an Ai play, the moment they go to expand with an undead gold mine or possibly night elf, the game crashes as soon as it orders their worker the command. Extremely wierd way to crash. However, that won't happen if the building is like >10,000 units away from the expansion gold mine.Not sure if other factors are important, too but I definitively had buildings which crashed my AI and after changing the pathing requirement it worked, maybe the pathing texture/collision was also missing.
This is probably a division-by-zero problem with the way the AI calculates its pathing.I ran into this problem extensively. It gave me such a hard time because it was extremely hard to pin point. I set a Tavern building with no pathing Ai so that they could be set closer to each other and take up less space (dockyard and smaller building Ai works best). If you set it to none, the game plays fine without Ai. If you have an Ai play, the moment they go to expand with an undead gold mine or possibly night elf, the game crashes as soon as it orders their worker the command. Extremely wierd way to crash. However, that won't happen if the building is like >10,000 units away from the expansion gold mine.
What I like about the latest update: the game tells you the reason of the crash. That makes everything a lot easier.At this point, the list of things that do not crash this game might be shorter.
wtf it does?What I like about the latest update: the game tells you the reason of the crash. That makes everything a lot easier.
It tells you what has cused the crash.wtf it does?![]()
where do we find this info? I checked crash logs after latest patch and it's the same info as beforeIt tells you what has cused the crash.
An extra small window pops up right below the crash report. I'll post a screenshot here when it happens next time.where do we find this info? I checked crash logs after latest patch and it's the same info as before
Here, as I promised, my fellow map maker. It doesn't happen all the time, but it has helped me to deal with a few crushes already.where do we find this info? I checked crash logs after latest patch and it's the same info as before
ah yeah I’ve been given this once before like a year ago for a corrupted loading screenHere, as I promised, my fellow map maker. It doesn't happen all the time, but it has helped me to deal with a few crushes already.
globals
region r = CreateRegion()
endglobals
native BlzSetUnitMaxHP takes unit whichUnit, integer hp returns nothing
-------- setup version 2.0.3.22988: --------

Events


Unit - A unit enters (Playable map area)

Conditions


((Triggering unit) is an illusion) Equal to True

Actions


Custom script: call UnitRemoveAbilityBJ( 'AHer', GetTriggerUnit() )
Events

Game - The in-game time of day becomes Equal to ...
Actions

Game - Set time of day speed to ...% of the default speed
constant abilityreallevelfield ABILITY_RLF_CHANCE_TO_MISS_CRS = ConvertAbilityRealLevelField('Crs1')
Did anyone manage to reproduce this issue?Setting an ability (adding or incrementing it) to the unit may cause crash if the unit is dead. Since the interpreter is not instant, sometimes the script will trigger properly on an alive unit, but during its execution a unit becomes dead.
This bug happens on v1.27.
To fix that issue before adding/setting ability level on the unit check whether the unit is alive.
UnitAddAbility(Footman, FourCC('AHbn'))
KillUnit(Footman)
for i = 1, 10000 do
LogWrite("Starting iter", i, "unit:", Footman, "alive:", UnitAlive(Footman), "...")
-- IncUnitAbilityLevel(Footman, FourCC('AHbn'))
UnitRemoveAbility(Footman, FourCC('AHbn'))
TriggerSleepAction(0.1)
LogWrite("add")
-- DecUnitAbilityLevel(Footman, FourCC('AHbn'))
UnitAddAbility(Footman, FourCC('AHbn'))
TriggerSleepAction(0.1)
LogWrite("inc")
IncUnitAbilityLevel(Footman, FourCC('AHbn'))
TriggerSleepAction(0.1)
end
abilTimerAdd = CreateTimer()
abilTimerDel = CreateTimer()
abilTimerInc = CreateTimer()
hfoo, Hamg = nil, nil -- suppress Debug Utils warning
-- 0-delay timers crash after ~512s
--delayAdd, delayDel, delayInc = 0, 0, 0
delayAdd, delayDel, delayInc = 0.001, 0.002, 0.003
TimerStart(abilTimerAdd, delayAdd, true, function()
UnitAddAbility(hfoo, FourCC('AHre'))
UnitAddAbility(Hamg, FourCC('AHre'))
end)
TimerStart(abilTimerDel, delayDel, true, function()
UnitRemoveAbility(hfoo, FourCC('AHre'))
UnitRemoveAbility(Hamg, FourCC('AHre'))
end)
TimerStart(abilTimerInc, delayInc, true, function()
IncUnitAbilityLevel(hfoo, FourCC('AHre'))
IncUnitAbilityLevel(Hamg, FourCC('AHre'))
end)
-- paste separately to run later:
hfoo = CreateUnit(Player(0), FourCC("hfoo"), -30, 0, 90)
Hamg = CreateUnit(Player(0), FourCC("Hamg"), -30, 0, 90)
-- later yet:
KillUnit(hfoo)
KillUnit(Hamg)
-- later yet yet:
RemoveUnit(hfoo)
RemoveUnit(Hamg)
This is related to "20. Setting certain cooldown values to 0 can cause infinite loop under some conditions like with Damage over Time spells".Found a pretty evil one: If an ability based on Exhume Corpses (Aexh) has its 'Stats - Duration - Normal' (Dur1) set to 0.000, the game will freeze at exactly 512 (2^9) seconds elapsed game time.
If at least 512 seconds have already elapsed and no unit or hero present on the map has the ability yet, the game will freeze immediately once the unit enters the map or when an already-present unit/hero learns the ability.
The other duration stat, 'Stats - Duration - Hero' (HeroDur1), doesn't seem to be affected by this. It may be set to 0.000 without issue.
Seems removing AHer from any hero causes crash when they're selected.Creating an illusion from a hero and removing the 'AHer' ability from the illusion crashes the game when hoovering over that illusion with the mouse.
-------- setup version 2.0.3.22988: --------
Events
Unit - A unit enters (Playable map area)
Conditions
((Triggering unit) is an illusion) Equal to True
Actions
Custom script: call UnitRemoveAbilityBJ( 'AHer', GetTriggerUnit() )