• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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