i have some tower for my game and i use function like:
On "SpawnBullet" = > > > > tower ==> spawn bullet on layer 0
and i call it for tower,
but when one tower has target, the other tower shoot too!
Because the tower is probaly 'unreferenced'.
Functions start picking from scratch. Meaning, the tower is not picked. When no tower is picked, the actions run on all towers.
1/ If the tower has a turret behaviour, then use the 'on shoot' trigger. It is meant for this.
2/ More generaly. If you picked an object and want to call a function with actions that work for that object. Then add the expression object.UID as a parameter to the function call. And in the 'on function' you use the condition 'pick by UID' with UID= object.function.param(n).
Develop games in your browser. Powerful, performant & highly capable.
thank you so much. i try for that.