Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Simple Move not working with Possessed Characters

I'm making a system where you can controll multiple characters, switching between them by pressing a button, the game its a top down project where the characters move through a "Simple Move to Location" on a Player Controller, simple stuff, pretty much like the UE Template.

The issue here is, while i can normally controll the first Character that the Controller Possess, when i possess a diferent one the character just doesn't move, i change characters again and again and they just don't move, but when i finally change back to the first Character that the Controller possessed, it moves normally.

I tried to Un Possess the characters before doing the process but it doesn't work, all Characters comes from a Parent with auto possess disabled and AI controll set to Placed on World or Spawned, but before that the simple system that does not work its that, when i possess a diferent character, the said character doesn't move... maybe i'm forgeting something simple here or something like that and i'll love some help from anyone out there.

This is a Simplified version of the current setup on the PlayerController that i have now... alt text

Product Version: UE 4.20
bug.png (178.3 kB)
more ▼

asked Nov 06 '18 at 03:23 PM in Blueprint Scripting

avatar image

26 2 3

avatar image mightyenigma Nov 06 '18 at 05:13 PM

I don't know yet but I would recommend replacing Length node with Last Index node as that will cause additional problems otherwise.

avatar image lLegion Nov 07 '18 at 09:43 AM

Good idea, don't know if there's any diference but that's a better way to check the current character on the list.

avatar image ThompsonN13 Nov 08 '18 at 02:46 AM

depending on the situation you may net need to posses any of the characters. im imagining a click to move type situation so i may be off a bit, but if thats the case you can have the characters possesed by a ai controller and still move them from your player controller via a move to you just need a reference to the character you want to move.

avatar image ThompsonN13 Nov 08 '18 at 03:03 AM

heres a little example of what i was talking about. if you look at picture two below you will see the thirdperson character and a on clicked event which gets the player controller and sets the selectedChar variable to the character that was clicked. you can skip this in your case since you will have a list to work from. the first picture below shows the player controller which has a right mouse event which gets the location where i right click and moves the selected actor to that location. as long as you have a nav mesh volume it will work. course this is just a quick example for proof of concept.

alt text

alt text

capture.png (240.3 kB)
capture2.png (107.6 kB)
avatar image lLegion Nov 08 '18 at 08:31 AM

Yep i though about that workaround while i was at work, didn't try it cause i need to literally controll the character for diferent input and events, something that i will try today is destroying the character that the controller was possessing before possessing another one and creating a copy there, don't know if it'll work but at least it makes sense. I'm still curious though, even making it work i still want to know why a simple possess like that doesn't tranfer that kind of movement controll to the character, but i guess that's a question for Epic Games.

I'll try to find a way to implement this work around when i get there first to see if its viable concidering all the other sistems on the game, thanks for the hint \o_

avatar image ThompsonN13 Nov 08 '18 at 02:51 PM

i just tried creating a setup as you initially described and it works fine in my case. are you sure you have a nav mesh bounds volume in you level. how are you actually moving the characters? the issue could be in your movement script.

alt text

capture.png (387.2 kB)
avatar image lLegion Nov 09 '18 at 05:35 AM

Exactly, i did the same and it did work, but with my project it just didn't. Had to make a system with a "Add movement input" after making a path to location today to get it to work without having to remake the entire blueprint from scratch, don't realy know why it is happening specifically with Simple Move to Location, that's what i'm going to try to discover today, but so far, the problem seems to be my project at work, and since the only thing that its not tranfered to my new possessed character its the movement, i bet its something wrong with the controller, i thoough it was the navmesh volume but its fine.

Fun fact, when i make the controller "Un possess" the character BEFORE possessing the next one, the inputs on the next possessed character work, but when i try to move him my old character move instead... crazy right? this just keeps getting more and more weird the more i look into it.

avatar image ThompsonN13 Nov 09 '18 at 02:09 PM

i did the same and it did work, but with my project it just didn't.

so which is it? it did or didnt?

show us your movement script so we can make sure its not that. also did you ever fix your posses script it has a few issues in it. for example you are possesing the current character +1 which is good but your not ensuring its a valid character until after you posses, what i mean is that it could be index 5 when theres only 4 indexes.

inputs on the next possessed character work, but when i try to move him my old character move instead

so the inputs dont work then, or your script is getting the wrong character to move.

avatar image lLegion Nov 10 '18 at 06:48 PM

so which is it? it did or didnt?

It didn't, that's why i had to make a movement system from scratch, but here's a test i did at home and at work

I created 2 projects, both Top Down Templates from Unreal, one in 4.19 and the other on 4.20, and did the same code on both projects

The Project made on 4.19 worked fine, while the 4.20 project just didn't, don't know what version you used there to replicate the issue but here that's the results

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question