# Title must be at least five charactars

**URL:** <https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470>\
**Category:** Arcade\
**Created:** [March 2, 2021, 4:37pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470 "2021-03-02T16:37:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [March 2, 2021, 4:37pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/1 "2021-03-02T16:37:15Z")

</div>

How do I make my guy shoot one way if he is facing that way and another if facing that way?

---

<div class="post-metadata">

**Author:** ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)\
**Post date:** [March 2, 2021, 4:45pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/2 "2021-03-02T16:45:22Z")

</div>

Make a variable that stores the last keystroke, either left or right, and then check for what it was.

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [March 2, 2021, 5:03pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/3 "2021-03-02T17:03:37Z")

</div>

can you show a screenshot with the code or something?

---

<div class="post-metadata">

**Author:** ![Bag3l](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bag3l/32/18267_2.png) [@Bag3l](https://forum.makecode.com/u/Bag3l)\
**Post date:** [March 3, 2021, 4:45pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/4 "2021-03-03T16:45:49Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/f45ca3adb680aaac5d75b52d9b8fc91c0abe1820.png)  
Here you go, mate! Don’t mind the flip image things, those are to indicate direction.  
Attach a variable to the left and right buttons, and have the shoot button check the direction. I use this all the time. I’d also recommend setting a starting variable in the on start block, to let you shoot without moving first.

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [March 3, 2021, 4:51pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/5 "2021-03-03T16:51:53Z")

</div>

For readability, you can do something like this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/86e4f605878ed728b66d6c7a62b635c1f8ebf02b.png)

---

<div class="post-metadata">

**Author:** ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)\
**Post date:** [March 3, 2021, 4:52pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/6 "2021-03-03T16:52:04Z")

</div>

You can also drag the true false booleans from the logic section. And then you just put `left` instead of `left = 1`

---

<div class="post-metadata">

**Author:** ![Bag3l](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bag3l/32/18267_2.png) [@Bag3l](https://forum.makecode.com/u/Bag3l)\
**Post date:** [March 3, 2021, 7:14pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/7 "2021-03-03T19:14:04Z")

</div>

I’m aware. I started using 1’s and 0’s when I was just starting, and now I’ve just kind of gotten in the habit.

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [March 3, 2021, 7:21pm UTC](https://forum.makecode.com/t/title-must-be-at-least-five-charactars/6470/8 "2021-03-03T19:21:43Z")

</div>

Thank you guys so much
