• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to replace Building Animation?

Status
Not open for further replies.
Question:
How to replace the standard undead building loop effect with this one?

I just downloaded this model:
Northrend Undead Building Birth - Page 2 - The Hive Workshop - A Warcraft III Modding Site
and tried to apply it
I didn't try the way it was explained there because it didn't seem to be MUI so i tried it myself using JASS
(second thing I am using JASS for so this might be the problem....)

JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    local effect lastone = null
    call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 100.00 )
    call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "war3mapImported\\UBirth.mdx" )
    set lastone = GetLastCreatedEffectBJ()
    call PolledWait( 10.00 )
    call DestroyEffectBJ( lastone )
    call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 0.00 )
endfunction

whats happening:
-the unit is invisible for 10 seconds
-the animation too

it makes sense but it was explained that way there so what to doto fix it?

thx :thumbs_up: in advance
 

Attachments

  • frostyBuild.w3x
    67.3 KB · Views: 159
oh yes right u need that sry xD
edit: this one works now
some1 important make this topic solved please :)
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    local effect lastone = null
    call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 10.00 )
    call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "war3mapImported\\UBirth.mdx" )
    set lastone = GetLastCreatedEffectBJ()
    call PolledWait( 10.00 )
    call DestroyEffectBJ( lastone )
    call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 0.00 )
endfunction

//===========================================================================
function InitTrig_build takes nothing returns nothing
    set gg_trg_build = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_build, EVENT_PLAYER_UNIT_CONSTRUCT_START )
    call TriggerAddAction( gg_trg_build, function Trig_Untitled_Trigger_001_Actions )
endfunction
 
How can I apply this to only one building?

JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    local effect lastone = null
    if ( GetUnitTypeId(GetConstructingStructure()) == 'unpl' ) then
        call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 10.00 )
        call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "war3mapImported\\UBirth.mdx" )
        set lastone = GetLastCreatedEffectBJ()
        call PolledWait( 10.00 )
        call DestroyEffectBJ( lastone )
        call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 0.00 )
    else
    endif
endfunction

//===========================================================================
function InitTrig_build takes nothing returns nothing
    set gg_trg_build = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_build, EVENT_PLAYER_UNIT_CONSTRUCT_START )
    call TriggerAddAction( gg_trg_build, function Trig_Untitled_Trigger_001_Actions )
endfunction

'unpl' is the unit type (undead necropolis in this case)
to figure out the internal unit names open the object editor and hit "strg + d"

"call PolledWait( 10.00 )" is the time the animation should be attached (in seconds)
because it takes wc3 some seconds to remove you may reduce the time by a little bit

however this is my third jass trigger so it might be buggy
 

Attachments

  • frostyBuild.w3m
    118.2 KB · Views: 145
Level 3
Joined
Mar 15, 2009
Messages
39
'unpl' is the unit type (undead necropolis in this case)
to figure out the internal unit names open the object editor and hit "strg + d"

"call PolledWait( 10.00 )" is the time the animation should be attached (in seconds)
because it takes wc3 some seconds to remove you may reduce the time by a little bit

however this is my third jass trigger so it might be buggy

Ok I get that much now... But say I made a custom building... How do I know what it's unit type thing is?
 
Level 4
Joined
Mar 14, 2009
Messages
98
Go to the object editor. Hit ctrl+D or go to View->Display Values As Raw Data. Then look for your custom unit/ability/whatever. It should be in this form h000:hfoo (Footman2). The first four characters is its Unit Type Id. The next four characters is its base unit. And the thing in the parenthesis is its name.
 
Status
Not open for further replies.
Top