#How do I make a mob become hostile at night? [RESOLVED]

1 messages · Page 1 of 1 (latest)

fervent karma
#

I have this server entity json file that I pretty much ripped completely off the spider json file, but just changed the environment_sensor from is_brightness to is_daytime as well as some other tweaks. But my entity doesn't seem to be aggressive at all. Can anyone help?

marsh garnet
#

I took a quick look

It looks like there isn't that much that is different from the spider behavior

Maybe reset back to the spider code to get it working again

Then slowly change the things you want to change and test each change so you can see what breaks

This is why I prefer Javascript because you can /reload and have actual error logs 🙂

fervent karma
#

I just tried to use the default spider behavior, and the attack aggression is working fine but even with the default the is_brightness hostility isn't doing anything.

fervent karma
#

well now it's doing something

#

I believe i might've found the issue. I remove navigation.climb because i thought it was part of the spider, but it still needs navigation.walk/generic to move to the player

fervent karma
#

There's one more thing though, is there a way to make them stop being angry at a target when it becomes day? For now as long as they continue attacking the player they will never stop

marsh garnet
#

You could try putting the melee attack component in the hostile component group

That way it doesn't have the ability to attack if it becomes day

#

I don't think there's a way to clear a target sadly

marsh garnet
fervent karma
#

on second thought i might need it for it to work

fervent karma
#

I added reevaluate_description and put the daytime filter and it worked an didn't end up messing with the neutral behavior

#

thank you two