# Changing Movement Mode affects other characters

**URL:** <https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780>\
**Category:** Character & Animation\
**Tags:** possessing-pawns, unreal-engine, Blueprint, question\
**Created:** [January 13, 2017, 6:01pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780 "2017-01-13T18:01:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoquiGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/coquigames/32/1194591_2.png) [@CoquiGames](https://forums.unrealengine.com/u/CoquiGames)\
**Post date:** [January 13, 2017, 6:01pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/1 "2017-01-13T18:01:24Z")

</div>

Hi everyone,

I’m working on a game where you can switch between 3 characters at any point during runtime. The 3 characters are children of a master character BP and share the same functionality. This master character BP is based on the ThirdPersonBP from the normal template.

I have a CharacterSelect blueprint with the following functionality:

 ![121931-switch2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/7/5a7c8b29d18e7fd11edeab8ca089a29c90f3db21.jpeg)

On Event Begin Play I get the references to all characters in the level like this:

 ![Switch1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/9/79c13d998be6ca20ca3b261c8dccbd3c56f449d8.jpeg)

Then when the Player presses 1,2 or 3, it possesses the appropriate pawn:

 ![121933-switch3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/a/cfa41db461b9f554d8a18f2ccbea20643e014fc4.jpeg)

I also have a simple water blueprint that changes the Movement Mode of the Character on overlap:

 ![121934-water.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/8/878c2fd90aa97558d08fdb19d92a2ae89bbd232f.jpeg)

**Here’s the issue:**

When Movement Mode for one character changes, the Movement Mode for the other 2 changes as well as soon as I possess them! If I jump and switch in mid air, the character STAYS in mid air. If I set the Movement Mode of one character to Swimming…the Movement Mode of any possessed pawn will also change to Swimming.

Is as if the Character Movement that I reference is changing at the parent level and not the child level (even if I specifically reference the child)

Please take a look at this 1min video to see what I’m talking about: [**Youtube Video**][5]

Can anyone tell me what Im doing wrong here? I want to have one character swim, while the others walk / jump independently.

Really appreciate any help!

Thanks!

-J

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [January 13, 2017, 7:12pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/2 "2017-01-13T19:12:11Z")

</div>

In the definition of `ACharacter` (the parent class of `ThirdPersonCharacter`) in `Engine/Source/Runtime/Engine/Private/Character.cpp` about line `1003` (in branch `4.15` at the moment) it has:

```
//
// Static variables for networking.
//
static uint8 SavedMovementMode;

```

So, your result is not surprising. The ACharacter parent class stores the movement mode in a static class variable that would affect any and all instances of the class or any subclasses.

I don’t know much about the networking side of C++ (yet), so I couldn’t say if they _really_ need that variable to be a static class variable in order for it to replicate across the network, but that’s what’s causing the behavior you see.

---

<div class="post-metadata">

**Author:** ![CoquiGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/coquigames/32/1194591_2.png) [@CoquiGames](https://forums.unrealengine.com/u/CoquiGames)\
**Post date:** [January 13, 2017, 8:42pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/3 "2017-01-13T20:42:18Z")

</div>

Thank you for your answer CleanCut! I haven’t looked at C++ in UE4, just learning Blueprint. From your answer it sounds like what I want to do is not possible if I’m using the Character class. I’m very surprised that this is the case, but perhaps there is a reason because of multiplayer.

Do you have any suggestions besides changing source code or using the Pawn class to achieve this?

Thanks again for your hep!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [January 13, 2017, 10:32pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/4 "2017-01-13T22:32:26Z")

</div>

Well, if you are looking for something to be done in blueprints then the only thing I can think of is making your own Pawn subclass blueprint and implementing all of the character functionality by yourself (probably a pretty massive undertaking).

If you are willing to build your engine from source you could experiment with some simple tweaks and see if it works for you. For example, if you aren’t using networking maybe it will “just work” if you remove the `static` keyword from that line I mentioned so that the movement mode is stored per instance instead of globally in the class.

---

<div class="post-metadata">

**Author:** ![CoquiGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/coquigames/32/1194591_2.png) [@CoquiGames](https://forums.unrealengine.com/u/CoquiGames)\
**Post date:** [January 14, 2017, 8:21pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/5 "2017-01-14T20:21:24Z")

</div>

Thanks for the clarification CleanCut. I think both options are probably too much for me at the moment. I ended up restricting when you can switch characters to prevent those issues.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![TheWTFage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheWTFage](https://forums.unrealengine.com/u/TheWTFage)\
**Post date:** [March 13, 2018, 7:45pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/6 "2018-03-13T19:45:13Z")

</div>

I filed a bug report because I’m having similar issues: [Unreal Engine Issues and Bug Tracker (UE-54905)](https://issues.unrealengine.com/issue/UE-54905)

---

<div class="post-metadata">

**Author:** ![TheWTFage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheWTFage](https://forums.unrealengine.com/u/TheWTFage)\
**Post date:** [March 13, 2018, 7:47pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/7 "2018-03-13T19:47:58Z")

</div>

UE-54905  
Useful information for this bug in this thread.

---

<div class="post-metadata">

**Author:** ![CoquiGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/coquigames/32/1194591_2.png) [@CoquiGames](https://forums.unrealengine.com/u/CoquiGames)\
**Post date:** [March 20, 2018, 1:59pm UTC](https://forums.unrealengine.com/t/changing-movement-mode-affects-other-characters/381780/8 "2018-03-20T13:59:17Z")

</div>

Thanks! Hopefully this gets addressed in a future release - its quite surprising they didnt anticipate this usecase.
