• 🏆 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!

How to replace Building Animation?

Status
Not open for further replies.
Level 19
Joined
Feb 4, 2009
Messages
1,313
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: 157
Level 19
Joined
Feb 4, 2009
Messages
1,313
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
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
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: 142
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