I’m trying to make AI entities fight others AI entities by using a set damage of animation system so everytime an animation-type is played, collided entity will recieve x amount of damage. This also includes the player. I searched and reached the video tutorials and the extension “health” and analize it carefully seeing that, it was created with the intention of “recieve damage”, instead of “giving damage” something that is not what I was expecting. will take a long time doing it that way.
I want it that damage value of this entity affect all entities. So if I decide to update new creatures…, all that long work can be done in minutes if it is with a attack variable. Even if it isn’t to give damage trought animations, if it can aply to all enemies at once it would be of big help.
In scene editor you have in upper right some icons one of them will show you groups section (hover over each icon with cursor to display their names)
And there you simply just add new group rename it and add crap to it
I see. Zombie, who is an object, collision with Vampires, who is a group of objects; Pick all objects (of the mentioned group) and change the var HP (health) of mentioned group. One thing I’m confused. Is the substract a variable that I have to create? I guess I have to attach it to the entity.
Wait, does Zombie (first line) can be a group too? So “group one make collision with group two”?
It’s up to you how you set the amount to be deducted. I just followed @ZeroX4 example - it’s a way it could be implemented, but not the only way. You can hard code the value in, you can have it in variable (object, scene or global) or put in some formulae.
In this example, yes, it’s checking if a member of one group collides with a member of another group. But you could make it object vs object, or object vs group.
My example was only intended to show that you need to use the Pick all instances condition to affect all of the other objects.
BTW, keep in mind this is not a complete solution - if a zombie collides with a vampire then you’ll also want to separate the two colliding objects. Otherwise the collision will be actions every game frame, and lead to a sudden health depletion on the vampires.