• 🏆 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] Problem with morphing ability in building order

Status
Not open for further replies.
Level 2
Joined
Aug 21, 2010
Messages
17
I have a custom race where there is a Spider Queen which can evolve with an ability based on the Destroyer Form of the Undead. The problem is that the AI seems not to know how to build the "evolution" of the queen. The AI should use the Evolution ability in order to evolve the queen, but it can't. Does anyone know how to do this?

This is the build order code fragment

JASS:
function BuildPriorities takes nothing returns nothing
    local integer mine = TownWithMine()
    call SetBuildAll( BUILD_UNIT, 1, 'h01J', -1 )
    call SetBuildAll( BUILD_UNIT, 1, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 2, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 3, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 4, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 5, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 6, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 7, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 8, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 1, 'n01H', -1 )
    call SetBuildAll( BUILD_UNIT, 1, 'h01O', -1 )
    call SetBuildAll( BUILD_UNIT, 1, 'n02H', -1 )
    call SetBuildAll( BUILD_UNIT, 9, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 10, 'h01N', -1 )
    call SetBuildAll( BUILD_UNIT, 1, 'n01I', -1 )
    call SetBuildAll( BUILD_UNIT, 1, 'n01D', -1 )
    call SetBuildAll( BUILD_UNIT, 2, 'n01D', -1 )
    call SetBuildAll( BUILD_UNIT, 3, 'n01D', -1 )
endfunction

The Queen ID is n02H while the evolved ID is n01I.

I checked out the melee undead script for reference, and they use SetBuildUnit(1, BLK_SPHINX) to "evolve" a Destroyer from an Obsidian Statue, so I really don't understand why it doesn't work here.
 
Status
Not open for further replies.
Top