Hello All,
messing around with scripts (as always) and i think i figured out a way to make Wolves your friend and kill Zombies
i will copy and paste the whole code (from the entityclasses.xml) ...
<entity_class name="animalWolf" extends="animalTemplateTimid">
<property name="Tags" value="animal"/>
<!--property name="Prefab" value="Wolf"-->
<property name="AvatarController" value="AvatarAnimalController"/>
<property name="ModelType" value="Standard"/>
<property name="HasRagdoll" value="true"/>
<property name="PhysicsBody" value="wolf"/>
<property name="Mass" value="95"/>
<property name="Prefab" value="/Entities/Animals/Wolf/animalStandardWolfRagdoll"/>
<property name="Mesh" value=""/>
<property name="HasDeathAnim" value="true"/>
<property name="RootMotion" value="true"/>
<property name="RagdollOnDeathChance" value=".5"/>
<property class="MechanimAttackTriggers">
<property name="state0" value="AttackTrigger"/>
</property>
<property class="MechanimAttackStates">
<property name="state0" value="Attack"/>
<property name="state1" value="AttackStandingStill"/>
</property>
<property class="MechanimPainTriggers">
<property name="state0" value="PainTrigger"/>
</property>
<property class="MechanimPainStates">
<property name="state0" value="Pain"/>
</property>
<property class="MechanimDeathTriggers">
<property name="state0" value="DeathTrigger"/>
</property>
<property class="MechanimDeathStates">
<property name="state0" value="Death"/>
</property>
<property name="AITask-1" value="Swim"/>
<property name="AITask-2" value="BreakBlock"/>
<property name="AITask-3" value="Territorial"/>
<property name="AITask-4" value="ApproachAndAttackTarget" param1="EntityZombie,99"/>
<property name="AITask-5" value="ApproachSpot"/>
<property name="AITask-6" value="Look"/>
<property name="AITask-7" value="Wander"/>
<property name="AITask-8" value=""/>
<property name="AITarget-1" value="SetAsTargetIfHurt"/>
<property name="AITarget-2" value="BlockingTargetTask"/>
<property name="AITarget-3" value="SetNearestEntityAsTarget" param1="EntityZombie,9"/>
<property name="AITarget-4" value=""/>
<property name="SoundRandom" value="Animals/Wolf/wolfroam"/>
<property name="SoundAlert" value="Animals/Wolf/wolfalert"/>
<property name="SoundHurt" value="Animals/Wolf/wolfpain"/>
<property name="SoundDeath" value="Animals/Wolf/wolfdeath"/>
<property name="SoundAttack" value="Animals/Wolf/wolfattack"/>
<property name="SoundSense" value="Animals/Wolf/wolfsense"/>
<property name="SoundGiveUp" value="Animals/Wolf/wolfgiveup"/>
<!-- Stealth -->
<property name="SmellAlertThreshold" value="99"/>
<!-- Gameplay -->
<property name="HandItem" value="meleeHandAnimalWolf"/>
<effect_group name="Base Effects">
<passive_effect name="HealthMax" operation="base_set" value="222"/>
<passive_effect name="HealthMax" operation="perc_add" value="0"/> <!-- Animal HP scale -->
</effect_group>
<drop event="Harvest" name="foodRawMeat" count="0" tool_category="Butcher"/>
<drop event="Harvest" name="foodRawMeat" tag="butcherHarvest" count="25"/> <!-- animalWolf -->
<drop event="Harvest" name="resourceLeather" tag="butcherHarvest" count="10"/>
<drop event="Harvest" name="resourceAnimalFat" tag="butcherHarvest" count="5"/>
<drop event="Harvest" name="resourceFemur" tag="butcherHarvest" count="3"/>
<drop event="Harvest" name="resourceFemur" tag="allToolsHarvest" count="1"/>
</entity_class>
you can compare it to the original to see what i changed
So what this does is it makes the Wolf wander around like it usually does but when a zombie comes into proximity, it kills it
i am sure you guys can tweak it and make it way better than what i have... would be nice for it to follow you around and growl when a zombie is near or something...
its not perfect but its something lol
Happy Modding homies!!
messing around with scripts (as always) and i think i figured out a way to make Wolves your friend and kill Zombies
i will copy and paste the whole code (from the entityclasses.xml) ...
<entity_class name="animalWolf" extends="animalTemplateTimid">
<property name="Tags" value="animal"/>
<!--property name="Prefab" value="Wolf"-->
<property name="AvatarController" value="AvatarAnimalController"/>
<property name="ModelType" value="Standard"/>
<property name="HasRagdoll" value="true"/>
<property name="PhysicsBody" value="wolf"/>
<property name="Mass" value="95"/>
<property name="Prefab" value="/Entities/Animals/Wolf/animalStandardWolfRagdoll"/>
<property name="Mesh" value=""/>
<property name="HasDeathAnim" value="true"/>
<property name="RootMotion" value="true"/>
<property name="RagdollOnDeathChance" value=".5"/>
<property class="MechanimAttackTriggers">
<property name="state0" value="AttackTrigger"/>
</property>
<property class="MechanimAttackStates">
<property name="state0" value="Attack"/>
<property name="state1" value="AttackStandingStill"/>
</property>
<property class="MechanimPainTriggers">
<property name="state0" value="PainTrigger"/>
</property>
<property class="MechanimPainStates">
<property name="state0" value="Pain"/>
</property>
<property class="MechanimDeathTriggers">
<property name="state0" value="DeathTrigger"/>
</property>
<property class="MechanimDeathStates">
<property name="state0" value="Death"/>
</property>
<property name="AITask-1" value="Swim"/>
<property name="AITask-2" value="BreakBlock"/>
<property name="AITask-3" value="Territorial"/>
<property name="AITask-4" value="ApproachAndAttackTarget" param1="EntityZombie,99"/>
<property name="AITask-5" value="ApproachSpot"/>
<property name="AITask-6" value="Look"/>
<property name="AITask-7" value="Wander"/>
<property name="AITask-8" value=""/>
<property name="AITarget-1" value="SetAsTargetIfHurt"/>
<property name="AITarget-2" value="BlockingTargetTask"/>
<property name="AITarget-3" value="SetNearestEntityAsTarget" param1="EntityZombie,9"/>
<property name="AITarget-4" value=""/>
<property name="SoundRandom" value="Animals/Wolf/wolfroam"/>
<property name="SoundAlert" value="Animals/Wolf/wolfalert"/>
<property name="SoundHurt" value="Animals/Wolf/wolfpain"/>
<property name="SoundDeath" value="Animals/Wolf/wolfdeath"/>
<property name="SoundAttack" value="Animals/Wolf/wolfattack"/>
<property name="SoundSense" value="Animals/Wolf/wolfsense"/>
<property name="SoundGiveUp" value="Animals/Wolf/wolfgiveup"/>
<!-- Stealth -->
<property name="SmellAlertThreshold" value="99"/>
<!-- Gameplay -->
<property name="HandItem" value="meleeHandAnimalWolf"/>
<effect_group name="Base Effects">
<passive_effect name="HealthMax" operation="base_set" value="222"/>
<passive_effect name="HealthMax" operation="perc_add" value="0"/> <!-- Animal HP scale -->
</effect_group>
<drop event="Harvest" name="foodRawMeat" count="0" tool_category="Butcher"/>
<drop event="Harvest" name="foodRawMeat" tag="butcherHarvest" count="25"/> <!-- animalWolf -->
<drop event="Harvest" name="resourceLeather" tag="butcherHarvest" count="10"/>
<drop event="Harvest" name="resourceAnimalFat" tag="butcherHarvest" count="5"/>
<drop event="Harvest" name="resourceFemur" tag="butcherHarvest" count="3"/>
<drop event="Harvest" name="resourceFemur" tag="allToolsHarvest" count="1"/>
</entity_class>
you can compare it to the original to see what i changed
So what this does is it makes the Wolf wander around like it usually does but when a zombie comes into proximity, it kills it
i am sure you guys can tweak it and make it way better than what i have... would be nice for it to follow you around and growl when a zombie is near or something...
its not perfect but its something lol
Happy Modding homies!!