# Need Some Ideas Plz

**URL:** <https://forum.makecode.com/t/need-some-ideas-plz/3533>\
**Category:** Help\
**Created:** [September 18, 2020, 7:47pm UTC](https://forum.makecode.com/t/need-some-ideas-plz/3533 "2020-09-18T19:47:44Z")\
**Posts on this page:** 1\
**Showing post:** 39

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 3, 2020, 11:29am UTC](https://forum.makecode.com/t/need-some-ideas-plz/3533/39 "2020-10-03T11:29:07Z")

</div>

> [@UnderwaterAstronaut](#):
>
> I think if your character has animations then at the end of your animations thing you can set a variable and whenever it moves a certain direction, the variable is set to a number and so then you can make a statement saying 'if variable is set to this number or something like that then it would change the direction of the projectile?

@UnderwaterAstronaut  
I like how you change the animation of your sprite depending on the direction it is facing in:

> **[deep sea diver v2.1](https://arcade.makecode.com/96109-55229-74632-47006)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

@richard  
I know you can define and code enums in TypeScript, but is there any block code to define an enum? For instance, in block code define an variable having the name ‘DirectionFacing’ with the values Left, Right, Up, Down

This produces the script

enum DirectionFacing {  
Left,  
Right,  
Up,  
Down  
}

Assume the variable _direction_ has been set to DirectionFacing.Left in block code:

if (direction == DirectionFacing.Left){

}

---

_[View the full topic](https://forum.makecode.com/t/need-some-ideas-plz/3533)._
