• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[AI] Enemy Heroes Revive At Level 1 ? (Patch 1.30.4) [SOLVED]

Status
Not open for further replies.
Level 28
Joined
Feb 18, 2014
Messages
3,580
Hello, I'm experiencing a strange bug on patch 1.30.4 where enemy heroes controlled by the AI restart from level 1 after they are resurrected even if they are already leveled up. Example : I have a level 5 hero, when that hero dies and then gets resurrected at the altar, he becomes level 1 again?

Anyone know why is this happening? And does it happen on patch 1.30.4 only? I didn't experience this bug on 1.27 or 1.29 before.
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Please check this bug still exists in 1.32.3.
I don't have Reforged.
As a rough guess I would say the cause is that the enemy is training a new level 1 hero rather than reviving their dead hero.
I was thinking the same thing. I really don't know if this is related to the patch only (The campaign was made on 1.27a and then tested on 1.30.4. And it happens on every chapter not just one!) or is it because of the AI script (I'm using the hero for both defense and attack although I don't think this is the reason)

I didn't touch anything in the Object Editor. Here's the script :
JASS:
//============================================================================
//  Horde 03 -- Blue player -- Hard Difficulty -- AI Script
//============================================================================
globals
    player user = PlayerEx(1)
endglobals

//============================================================================
//  main
//============================================================================
function main takes nothing returns nothing
    call CampaignAI(MOON_WELL,null)
    call SetReplacements(3,3,3)
    call SetSlowChopping(true)
    call SetPeonsRepair(true)
    call SetTargetHeroes(true)
    call SetWoodPeons(6)
    call SetGoldPeons(5)

    call SetBuildUnitEx(1,1,1, TREE_LIFE)
    call SetBuildUnitEx(11,11,11, WISP)
    call SetBuildUnitEx(1,1,1, ELF_ALTAR)
    call SetBuildUnitEx(1,1,1, ANCIENT_WAR)
    call SetBuildUnitEx(1,1,1, HUNTERS_HALL)
    call SetBuildUnitEx(1,1,1, TREE_AGES )
    call SetBuildUnitEx(1,1,1, ANCIENT_LORE)
    call SetBuildUnitEx(1,1,1, ANCIENT_WIND)
    call SetBuildUnitEx(1,1,1, TREE_ETERNITY )
 
    call CampaignDefenderEx( 1,1,1, WARDEN      )
    call CampaignDefenderEx( 3,3,3, ARCHER      )
    call CampaignDefenderEx( 2,2,2, DRYAD       )
    call CampaignDefenderEx( 3,3,3, HUNTRESS    )

    call WaitForSignal()

    //*** WAVE 1 ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 5,5,5, ARCHER      )
    call CampaignAttackerEx( 3,3,3, HUNTRESS      )
    call SuicideOnPlayerEx(M4,M4,M4,user)

    //*** WAVE 2 ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 4,4,4, ARCHER      )
    call CampaignAttackerEx( 3,3,3, DRYAD        )
    call SuicideOnPlayerEx(M5,M5,M5,user)

    //*** WAVE 3 ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 1,1,1, WARDEN    )
    call CampaignAttackerEx( 4,4,4, HUNTRESS    )
    call CampaignAttackerEx( 3,3,3, DRUID_CLAW    )
    call CampaignAttackerEx( 2,2,2, BALLISTA    )
    call SuicideOnPlayerEx(M4,M4,M4,user)

    loop
        //*** WAVE 6 ***
        call InitAssaultGroup()
        call CampaignAttackerEx( 6,6,6, ARCHER      )
        call CampaignAttackerEx( 4,4,4, DRYAD    )
        call SuicideOnPlayerEx(M5,M5,M5,user)
    
        //*** WAVE 8 ***
        call InitAssaultGroup()
        call CampaignAttackerEx( 1,1,1, WARDEN     )
        call CampaignAttackerEx( 5,5,5, HIPPO_RIDER     )
        call CampaignAttackerEx( 4,4,4, HUNTRESS        )
        call CampaignAttackerEx( 3,3,3, BALLISTA    )
        call SuicideOnPlayerEx(M4,M4,M4,user)

        //*** WAVE 8 ***
        call InitAssaultGroup()
        call CampaignAttackerEx( 5,5,5, HIPPO_RIDER      )
        call CampaignAttackerEx( 4,4,4, HUNTRESS        )
        call CampaignAttackerEx( 2,2,2, BALLISTA    )
        call SuicideOnPlayerEx(M5,M5,M5,user)

    endloop
endfunction
 
Level 6
Joined
Jul 8, 2018
Messages
129
I'm pretty sure there is a really small window after a hero dies where you cant revive it (as their death animation happens and they float up). What could be happening is you don't have the trigger in your maps that stops you from building multiple heroes of the same type. Therefore when the AI loses their hero during that window where they cant revive the high-level one they just create a new one straight away since the hero is used in their defense as well.
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Might be related to the "call CampaignDefenderEx( 1,1,1, WARDEN )" call.
I'm pretty sure there is a really small window after a hero dies where you cant revive it (as their death animation happens and they float up). What could be happening is you don't have the trigger in your maps that stops you from building multiple heroes of the same type. Therefore when the AI loses their hero during that window where they cant revive the high-level one they just create a new one straight away since the hero is used in their defense as well.
Yes, it's indeed related to the defense. After I removed the warden from the altar the AI no longer creates another one.

Thank you both for the help!
 
Status
Not open for further replies.
Top