• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Is it possible to get zombies to target blocks?

Curious if anyone knows any way to get zombies to treat a specific block as if it were a player. Have them specifically target and go after that block, preferably as an even higher priority than attacking players. I've poked at the AiTasks, and specifically set them to ApproachAndAttackTarget and SetNearestEntityAsTarget to the BlockType(in this instance it is a vending machine, and there are no other vending machines, so I just used BlockVendingMachine), and it did not work. In the presence of a player, they go after the player. In the absence of a player, they mill around.

They seem perfectly happy to target and attack animals and npcs, but not blocks. I am curious if the AiTask system just isn't set up to register Block objects as valid targets, only Entity type objects? If so, I am curious if it is possible to make an object both an Entity and a Block, so it can support weight but also be attacked?

 
Hmm. This seems to be what I am running into.

Alternatively, is there a way to get an Entity to act like a block? Ie: Be structural, hold weight, show damage when a player attacks or hovers over with repair tool, etc?

 
Solved that issue, simply have them take up the same place, with the block being structural air. But don't know how to spawn an entity. :/ It might be impossible.

 
Back
Top