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

call AddUnitAnimationProperties(unit,"Alternate",true)

Status
Not open for further replies.
Level 5
Joined
Aug 12, 2010
Messages
87
this does not work, i probably need trigger event and specify unit help me pls, be good if someone add test map cus 1 line of script tell me nothing.

call AddUnitAnimationProperties(unit,"Alternate",true) ????:ogre_rage::goblin_boom:
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
this does not work, i probably need trigger event and specify unit help me pls, be good if someone add test map cus 1 line of script tell me nothing.

call AddUnitAnimationProperties(unit,"Alternate",true) ????:ogre_rage::goblin_boom:

unit is local variable so if u dont use jass them put "udg_"before ur global variable like this

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set unit = (Triggering unit)
      • Custom script: call AddUnitAnimationProperties(udg_unit,"Alternate",true)
or just try simple

  • Animation - Play (Triggering unit)'s Alternate animation
if u want use villager with 40 animation then i use like this

at map init
Set Attack_Anim[1] = Attack Flesh//hammer&axe[left hand]
Set Attack_Anim[2] = Attack Flesh//same also for long sword[left hand]
Set Attack_Anim[3] = Attack Channel//short sword[right hand] + shield[left hand]
Set Attack_Anim[4] = Attack Lumber//bow[left hand]
Set Attack_Anim[5] = Attack Gold//dual weapons[both hand]
Set Attack_Anim[6] = Attack//mage staff/wand etc[left hand]

system work like if i pick bow then the correct animation for bow is "Attack Lumber" so Attack_Int[Player number of (triggering player)]=4

  • Attack animation
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to Hero[(Player number of (Owner of (Attacking unit)))]
    • Actions
      • Set plNR = (Player number of (Owner of (Attacking unit)))
      • Animation - Play (Attacking unit)'s Attack_Anim[Attack_Int[plNR]] animation
 
Status
Not open for further replies.
Top