# How to get this code to effect all towers?

**URL:** <https://forum.makecode.com/t/how-to-get-this-code-to-effect-all-towers/18366>\
**Category:** Help\
**Created:** [March 9, 2023, 4:21pm UTC](https://forum.makecode.com/t/how-to-get-this-code-to-effect-all-towers/18366 "2023-03-09T16:21:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freeando](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/freeando/32/7740_2.png) [@Freeando](https://forum.makecode.com/u/Freeando)\
**Post date:** [March 9, 2023, 4:21pm UTC](https://forum.makecode.com/t/how-to-get-this-code-to-effect-all-towers/18366/1 "2023-03-09T16:21:19Z")

</div>

I’ve looked through this, and it may just be my lack of knowledge on this, but is there a way to make this effect everything that falls under the sprite category of “Tower”?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7d285490e0311176232efc1dc439953fc9686e66.png)  
Right now this only effects the most recently created sprite in the Tower category, and nothing else in the Tower category. I’m trying to make a tower defense game and this is a huge pain for me, and my brain just can’t think of a solution right now.

Please help!

---

<div class="post-metadata">

**Author:** ![Freeando](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/freeando/32/7740_2.png) [@Freeando](https://forum.makecode.com/u/Freeando)\
**Post date:** [March 13, 2023, 3:46pm UTC](https://forum.makecode.com/t/how-to-get-this-code-to-effect-all-towers/18366/2 "2023-03-13T15:46:51Z")

</div>

bump because this project is due soon
