# How to make character sprite turn left or right if moved to the left or right

**URL:** <https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074>\
**Category:** The Bunker\
**Created:** [July 1, 2020, 8:23am UTC](https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074 "2020-07-01T08:23:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mybachhertz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mybachhertz/32/7164_2.png) [@mybachhertz](https://discourse.cataclysmdda.org/u/mybachhertz)\
**Post date:** [July 1, 2020, 8:23am UTC](https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074/1 "2020-07-01T08:23:37Z")

</div>

How to make character sprite turn left or right if it is moved to the left or right?

---

<div class="post-metadata">

**Author:** ![MutaMan](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mutaman/32/7000_2.png) [@MutaMan](https://discourse.cataclysmdda.org/u/MutaMan)\
**Post date:** [July 1, 2020, 11:48am UTC](https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074/2 "2020-07-01T11:48:30Z")

</div>

I’m going to assume you mean in the creation of a tileset, as in, how to make it so that if you went left or right then the sprite you created would be facing left or right. Because as far as I know most if not all graphic packs already do this automatically, even the default retrodays.

In truth, I have no idea. But I would presume that while making the pack there’s either a single thing to set your sprite to and the game would automatically flip it or there’s two settings for your sprite in which you assign a left and right version.

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [July 1, 2020, 12:16pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074/3 "2020-07-01T12:16:58Z")

</div>

Monster and character sprites are automatically rotated/flipped in the game’s code.

---

<div class="post-metadata">

**Author:** ![mybachhertz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mybachhertz/32/7164_2.png) [@mybachhertz](https://discourse.cataclysmdda.org/u/mybachhertz)\
**Post date:** [July 1, 2020, 12:45pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074/4 "2020-07-01T12:45:12Z")

</div>

I’m using Mxotto+ it does not flip, can you send how to do it or can you send the code

---

<div class="post-metadata">

**Author:** ![Kadian](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kadian/32/214_2.png) [@Kadian](https://discourse.cataclysmdda.org/u/Kadian)\
**Post date:** [July 1, 2020, 2:36pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074/5 "2020-07-01T14:36:54Z")

</div>

I tested it with Mxotto+ (Patch 12), it flips.

What CDDA version are you using?

edit: Oh, also, the Code won’t help you, unless you know how to build the game from the code. The Code is also freely available on github, so you could just download it, but I feel it wouldn’t remotely help you.

---

<div class="post-metadata">

**Author:** ![mybachhertz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mybachhertz/32/7164_2.png) [@mybachhertz](https://discourse.cataclysmdda.org/u/mybachhertz)\
**Post date:** [July 1, 2020, 2:50pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-character-sprite-turn-left-or-right-if-moved-to-the-left-or-right/24074/6 "2020-07-01T14:50:25Z")

</div>

Oh ok thanks Ive already fixed it, sorry for the trouble
