# Wepons

**URL:** <https://forum.makecode.com/t/wepons/8203>\
**Category:** Help\
**Created:** [May 19, 2021, 4:04pm UTC](https://forum.makecode.com/t/wepons/8203 "2021-05-19T16:04:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JaeMs\_Games](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jaems_games/32/4231_2.png) [@JaeMs\_Games](https://forum.makecode.com/u/JaeMs_Games)\
**Post date:** [May 19, 2021, 4:04pm UTC](https://forum.makecode.com/t/wepons/8203/1 "2021-05-19T16:04:25Z")

</div>

I am trying to make a system where you can shoot, and the projectiles do different values of damage. For example, a missile will down 2/3 of the status bar, but bullets will only do about 0.1 in the system values. My only problem is that I need the bullets to come from the player, but still be classified as a custom sprite, not a projectile.

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [May 19, 2021, 6:15pm UTC](https://forum.makecode.com/t/wepons/8203/2 "2021-05-19T18:15:56Z")

</div>

get the position of the player, then create a variable sprite with your custom spritekind, then make the velocity depending on where they’re coming from.

---

<div class="post-metadata">

**Author:** ![JaeMs\_Games](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jaems_games/32/4231_2.png) [@JaeMs\_Games](https://forum.makecode.com/u/JaeMs_Games)\
**Post date:** [May 19, 2021, 7:09pm UTC](https://forum.makecode.com/t/wepons/8203/3 "2021-05-19T19:09:22Z")

</div>

The problem with that is then I would need to keep track of the player’s position, and that would lag my low-end PC.

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [May 19, 2021, 7:38pm UTC](https://forum.makecode.com/t/wepons/8203/4 "2021-05-19T19:38:40Z")

</div>

no, it wouldn’t, you would just have to start tracking when the player presses your desired button to shoot, then stop tracking after its done shooting.

---

<div class="post-metadata">

**Author:** ![LaserFoxPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/laserfoxpro/32/4105_2.png) [@LaserFoxPro](https://forum.makecode.com/u/LaserFoxPro)\
**Post date:** [May 19, 2021, 8:45pm UTC](https://forum.makecode.com/t/wepons/8203/5 "2021-05-19T20:45:14Z")

</div>

this is all the code you need:

 ![Screen Shot 2021-05-19 at 2.24.09 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/cccf3ef09e2da670244d43aa723e3a7cd0e1e192.png)

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [May 19, 2021, 9:21pm UTC](https://forum.makecode.com/t/wepons/8203/6 "2021-05-19T21:21:13Z")

</div>

He want’s custom SpriteKinds, so he can take different amounts of health away when it hits an enemy

---

<div class="post-metadata">

**Author:** ![LaserFoxPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/laserfoxpro/32/4105_2.png) [@LaserFoxPro](https://forum.makecode.com/u/LaserFoxPro)\
**Post date:** [May 19, 2021, 10:01pm UTC](https://forum.makecode.com/t/wepons/8203/7 "2021-05-19T22:01:53Z")

</div>

then make this:

 ![Screen Shot 2021-05-19 at 3.26.02 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c1c9724efa6f9e632b234ab4e6d4c1c6ca844c18.png)

---

<div class="post-metadata">

**Author:** ![JaeMs\_Games](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jaems_games/32/4231_2.png) [@JaeMs\_Games](https://forum.makecode.com/u/JaeMs_Games)\
**Post date:** [May 20, 2021, 4:09pm UTC](https://forum.makecode.com/t/wepons/8203/8 "2021-05-20T16:09:03Z")

</div>

Also, I like the prototype look of your placeholder bullet. 😆

---

<div class="post-metadata">

**Author:** ![JaeMs\_Games](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jaems_games/32/4231_2.png) [@JaeMs\_Games](https://forum.makecode.com/u/JaeMs_Games)\
**Post date:** [May 20, 2021, 4:09pm UTC](https://forum.makecode.com/t/wepons/8203/9 "2021-05-20T16:09:05Z")

</div>

Thanks!
