- Joined
- May 24, 2010
- Messages
- 184
Can you add a swim animation?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
(30 ratings)
Approved
Custom Script: call SetUnitAnimationByIndex( unit name, number )
Can you tell me if you made a villager with a swim animation and a sitting animation?

it's also levitating when standing, whyyy?
how do you find the animation index!? there's 250 animations, it's so hard to keep testing 1 by 1. T_T
You can use Magos' Model Editor to check all animations
Would u like to see an Arthas 100 animations? Focusing on combat\hit\defense\athletic animations...??????

Unit - Order Unit to Move To (Random point in Region)
Custom script: call SetUnitAnimationByIndex(udg_Farm01MaleVillager02,232)
Farm01 MaleVillager02 Work

Events

Conditions

Actions


-------- Use unit variable 'Farm01MaleVilager02' for the unit that has to transfer the boxes from place to another --------


-------- Set new RANDOM dropoffbox target spot using integer variable 'Farm01MaleVillager02Integer' --------


Set Farm01MaleVillager02Integer = (Random integer number between 1 and 5)


-------- Play 'take up the box' animation [PERFECT] --------


Custom script: call SetUnitAnimationByIndex(udg_Farm01MaleVillager02,202)


Wait 1.00 seconds


-------- Order villager to go to that new dropoff box --------


Unit - Order Farm01MaleVillager02 to Move To (Random point in Farm01DropBoxAreaArray[Farm01MaleVillager02Integer])


-------- Play 'carring a box' animation [CURRENTLY NOT WORKING PROPERLY] --------


Custom script: call SetUnitAnimationByIndex(udg_Farm01MaleVillager02,232)


-------- Wait until he gets to the dropoffbox and starts to 'idle' --------


Wait until ((String((Current order of Farm01MaleVillager02))) Equal to IdleOrderString), checking every 0.10 seconds


Unit - Make Farm01MaleVillager02 face (Center of Farm01DropBoxTargetArray[Farm01MaleVillager02Integer]) over 0.50 seconds


Wait 0.50 seconds


-------- Play drop the box' animation [PERFECT] --------


Custom script: call SetUnitAnimationByIndex(udg_Farm01MaleVillager02,203)


Wait 1.00 seconds


-------- Having do it all again --------


Trigger - Run Farm01 MaleVillager02 Work <gen> (checking conditions)
To find the unit name in Jass to this:
1. Create a trigger
2. Action->Kill Unit-> and then select the unit u want.
3.Edit->Convert the trigger to Custom Text.
4.The name of the unit will be something like this: gg_unit_
5.Copy and paste the unit name in jass into the script.
6 U can delete the trigger or hit ctrl+z to unde the transformation in Jass.
Or u can to that with the variabile like i said u can play the unit walk animation even if he stands or if he moves.
I will add some swim animations that will be good.
function Trig_sdfqerwr_Actions takes nothing returns nothing
call AddUnitAnimationPropertiesBJ( false, "Attack 3", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 4", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 5", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 6", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 7", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 8", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 9", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 10", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 11", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 12", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 13", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 14", gg_unit_Hpal_0002 )
call AddUnitAnimationPropertiesBJ( false, "Attack 15", gg_unit_Hpal_0002 )
endfunction
//===========================================================================
function InitTrig_Test takes nothing returns nothing
set gg_trg_Test = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Test, 1.00 )
call TriggerAddAction( gg_trg_Test, function Trig_sdfqerwr_Actions )
endfunction
For the love of god! what number is the sitting animation!?!? I've been searching for hours!
Splendid work by the way! A straight 5/5 for you mate!


