In an effort to make zombies target animals in this modlet I'm making, I want to set so zombies target the docile boars.
However each time I add class to animalBoar, the game shows "Object reference not set to an instance of an object" when trying to spawn the boar. Same goes with the zombies, when spawned, they seem to be looking for the (non-existing?) EntityAnimalBoar so the console says "Object reference not set".
I've looked at other classes like EntityAnimalRabbit and can only found it in entityclasses.xml, which means adding a new entity class shouldn't be a problem?
Here is my code in entityclasses.xml
However each time I add class to animalBoar, the game shows "Object reference not set to an instance of an object" when trying to spawn the boar. Same goes with the zombies, when spawned, they seem to be looking for the (non-existing?) EntityAnimalBoar so the console says "Object reference not set".
I've looked at other classes like EntityAnimalRabbit and can only found it in entityclasses.xml, which means adding a new entity class shouldn't be a problem?
Here is my code in entityclasses.xml
Code:
<append xpath="/entity_classes/entity_class[@name='animalBoar']">
<property name="Class" value="EntityAnimalBoar"/>
<property name="AITask-1" value="Swim"/>
<property name="AITask-2" value="RunawayWhenHurt"/>
<property name="AITask-3" value="RunawayFromEntity" data="class=EntityZombie"/>
<property name="AITask-4" value="Look"/>
</append>