行走特效


单位行走可以添加走路效果,例如马匹跑动增加尘雾,以及马的脚步声。

尘雾acttach部件:
	<attachment>
		Horse_Dust
		<component>
			Horse_Dust
			<assetreference type="ParticleSystem">
				<file>effects\Animal Particles\Horse_Dust.particle</file>
			</assetreference>
		</component>
		<anim>
			Idle
			<component>Horse_Dust</component>
		</anim>
	</attachment>
	<attachment>
		Horse_Debris
		<component>
			Horse_Debris
			<assetreference type="ParticleSystem">
				<file>effects\Animal Particles\Horse_Debris.particle</file>
			</assetreference>
		</component>
		<anim>
			Idle
			<component>Horse_Debris</component>
		</anim>
	</attachment>


单位行进产生沙尘(在<anim></anim>语句里生效,重复越多沙尘越大。)
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
步兵走路沙沙声
		<tag type="SpecificSoundSet" checkvisible="1" set="GenericFootsteps">0.11</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="GenericFootsteps">0.60</tag>
骑兵行进噔噔声
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof1">0.26</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof2">0.74</tag>



1.先用AOE3ED把单位xml提取出来。
2.添加上面所说的语句(顶部添加attach部件,anim那里attach新增的部件)
我添加的是领事馆轻骑兵:
  light_cavalry_horse.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
<!-- converted from XMB to XML -->

<animfile>
	<definebone>HS Bone Hoof Frnt Lt</definebone>
	<definebone>HS Bone Hoof Frnt Rt</definebone>
	<definebone>HS Bone Hoof Back Lt</definebone>
	<definebone>HS Bone Hoof Back Rt</definebone>
	<attachment>
		RiderAttachment
		<include>units\asians\consulate\light_cavalry\light_cavalry_rider.xml</include>
	</attachment>
	<attachment>
		Horse_Dust
		<component>
			Horse_Dust
			<assetreference type="ParticleSystem">
				<file>effects\Animal Particles\Horse_Dust.particle</file>
			</assetreference>
		</component>
		<anim>
			Idle
			<component>Horse_Dust</component>
		</anim>
	</attachment>
	<attachment>
		Horse_Debris
		<component>
			Horse_Debris
			<assetreference type="ParticleSystem">
				<file>effects\Animal Particles\Horse_Debris.particle</file>
			</assetreference>
		</component>
		<anim>
			Idle
			<component>Horse_Debris</component>
		</anim>
	</attachment>
	<component>
		ModelComp
		<logic type="LowPoly">
			<normal>
				<assetreference type="GrannyModel">
					<file>units\cavalry\light_cavalry\light_cavalry_age4_horse</file>
				</assetreference>
			</normal>
			<lowpoly>
				<assetreference type="GrannyModel">
					<file>units\cavalry\light_cavalry\lp_light_cavalry_age4_horse</file>
				</assetreference>
			</lowpoly>
		</logic>
		<decal>
			<effecttype>default</effecttype>
			<texture isfakeshadow="1">shadows_selections\shadow_consulate_64x64</texture>
			<selectedtexture>shadows_selections\selection_consulate_64x64</selectedtexture>
			<width>1.50</width>
			<height>3.00</height>
		</decal>
		<attach a="RiderAttachment" frombone="hotspot" tobone="ATTACHPOINT" syncanims="1"/>
	</component>
	<anim>
		Walk
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_canter</file>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">1.00</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">0.70</tag>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.83</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.50</tag>
		</assetreference>
		<component>ModelComp</component>
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof1">0.26</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof2">0.74</tag>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
	</anim>
	<anim>
		Jog
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_jog</file>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.80</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">0.95</tag>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.75</tag>
		</assetreference>
		<component>ModelComp</component>
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof1">0.26</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof2">0.74</tag>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
	</anim>
	<anim>
		Run
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_gallop</file>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.73</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">1.00</tag>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.70</tag>
		</assetreference>
		<component>ModelComp</component>
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof1">0.26</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof2">0.74</tag>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
		<attach a="Horse_Dust" frombone="HS Bone Master" tobone="HS Bone Hoof Back Lt" syncanims="0"/>
		<attach a="Horse_Debris" frombone="HS Bone Master" tobone="HS Bone Hoof Back Rt" syncanims="0"/>
	</anim>
	<anim>
		Highstep
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_highstep</file>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.73</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">1.00</tag>
			<tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag>
			<tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.70</tag>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Idle
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_A</file>
			<weight>40</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_B</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_C</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_D</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_F</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_G</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_H</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_I</file>
			<weight>40</weight>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Bored
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_bored_A</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_E</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_A</file>
			<weight>50</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_I</file>
			<weight>50</weight>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Attack_melee
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1-5_attack_A</file>
			<weight>40</weight>
			<tag type="Attack">0.56</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.43</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1-5_attack_B</file>
			<weight>10</weight>
			<tag type="Attack">0.47</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.40</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1-5_attack_C</file>
			<weight>10</weight>
			<tag type="Attack">0.54</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.49</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1-5_attack_D</file>
			<weight>10</weight>
			<tag type="Attack">0.54</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.47</tag>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Attack_trample
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_trample_A</file>
			<weight>40</weight>
			<tag type="Attack">0.56</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.46</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_trample_B</file>
			<weight>40</weight>
			<tag type="Attack">0.47</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.42</tag>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Death_by_melee
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_deathA</file>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.63</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_deathB</file>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.48</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.80</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_deathC</file>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.53</tag>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Death_by_range
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_deathA</file>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.63</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_deathB</file>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.47</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.79</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_deathC</file>
		<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.54</tag>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Death_by_havoc
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_death_front</file>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_death_behind</file>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_death_left</file>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_death_right</file>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_death_run</file>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Cheer
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_F</file>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_H</file>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_bored_A</file>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_E</file>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Raze_idle
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_A</file>
			<weight>40</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_B</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_C</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_D</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_F</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_G</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_H</file>
			<weight>10</weight>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_idle_I</file>
			<weight>40</weight>
		</assetreference>
		<component>ModelComp</component>
	</anim>
	<anim>
		Raze_attack
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1_attack_A</file>
			<tag type="Attack">0.43</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="TorchSwing">0.35</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1_attack_B</file>
			<tag type="Attack">0.43</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="TorchSwing">0.31</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1_attack_C</file>
			<tag type="Attack">0.43</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="TorchSwing">0.33</tag>
		</assetreference>
		<assetreference type="GrannyAnim">
			<file>animation_library\cavalry\horse_1_attack_D</file>
			<tag type="Attack">0.43</tag>
		<tag type="SpecificSoundSet" checkvisible="1" set="TorchSwing">0.35</tag>
		</assetreference>
		<component>ModelComp</component>
	</anim>
</animfile>

说一些与本教程无关的东西:你留意到RiderAttachment没?这个其实是骑手,在protoy.xml查到的animfile的路径是马的路径,不是骑手的路径,骑手是在马的xml文件,使用RiderAttachment定义的,然后通过attach将骑手附加在马上。自己往上面搜索看看吧,units\asians\consulate\light_cavalry\light_cavalry_rider.xml就是领事馆轻骑兵骑手的路径。

3.最后按照原路径放回游戏目录,进入游戏看效果吧。