Hello, I recently found Defold, and feels good about it so far.
Currently I’m go with the War battle tutorial , try to let the tanks fire at player. To do so, like “chase” action, I add another collision component, like this:
“attack-range”, and “aware-range” is in group “tank”, checking mask “player”, while the Player.go is in group “player”, checking mask “tank”.
My problem is, in on_message
method, I listen “collision_response”, but cannot tell which component is colliding, so is there a way to get this?
I could think about other solution, maybe I should simply check distance between player and tank, or maybe I should give “attack-range” a new group, “tank_attack” for example. But, as the group size is limited to 16, I may run out of it soon. or perhaps I should attach a new go on tank, and let this dummy go hold “attack-range” and a new script to listen to on_message
?
Or, do I in a completely wrong way?