Download

Setting Up Character Movement

Hi ive been following along on the really bad outed guides and ive run into a NULL error and something else i think it might be animation related here is the guide in question.

So ive followed along letter by letter word for word. I would state this guide works flawlessly but alas it does not. Upon completion of the guide all animations seem to work other than the “prone” when i hit the “X” key my character goes to prone, hit it again and he/she stands up as expected. now if i double tap “X” it starts glitching out and resetting the prone animation over and over and over until i press the button the 3rd time in which it stands up.

On top of this im getting a screen when i exit

Now ive followed the end link and im assuming its due to my (blue) target to character movement and not been able to locate the main character but im lost on how to fix.

Imagine im an APE, an alien or even a bipod, cause human clearly is not working for me in this regard and i cannot even follow a simple how2 so please explain this as if im a complete mongel/■■■■■■ on how to fix. Pictures and a real guide would be great but i think im expecting to much here…

i certainly know it cannot find MyPlayercharater because i started a fresh as it stated “we are using the Blank Project Template in order to start with a fresh project” so i assumed this would be semi bug free. Ive also tried to create a playercontroller and link in game mode but its still shows the error.

The problem is “get player character”.
There’s the distinct possibility that whatever you fish out has no movement component.
add an is valid? Test before using the value. And add an error print out with a print string if it isnt valid.

If it isnt valid, your character (whatever the engine thinks it might be) doesn’t include a movement component.

Yoy should aslo have an isvalid? Check on whatever the character is. There’s no guarantee the function will actually fish out a character you are controlling.

You probably also need a bit more experience before you delve into setting up movement.

As far as the tutorial goes, it seems fine. Should still work as expected if you use the default stuff the engine comes with and don’t add steps to it (like making a custom pawn instead of a character).
but as you just figured out, it doesn’t follow any of the best practices it probably should (being official documentation).

ok thanks, ill keep trying to work out why its doing it. I was missing movement Variable in the animation component I think not even sure if i can use it 2ce and where all this stuff needs to be put, Not sure if the “begin play” not being there is related but it transfers over to my main source when i copy and paste the code over and attach to another character with a “begin play” there, so its defo located in the code section that ive just copy and pasted from the tut. the Tut itself is ok. I know UE4 is in its early stages but when file/variable placement is very confusing and has such a steep learning curve when the documents should tell you especially simple making movement guide. I feel like 99.9% of the time im just guessing that stuff will work right.

I haven’t bothered to add steps to it because it chucks an error. The first was a multi threaded error which i just turned off warnings. The next was no exec on “cast to mycharacter” to the “calculate direction” here i think
AnimBP_EventGraph.png

so i just bypassed the box and set it. I keep my main source files separate and add in once they work or i can get them too. Usually i follow this way because that way i can see the original as well as my own version and compare side by side and make a mix in the 2.

In any case code that does not compile or work shouldn’t be in a TUT even apes can copy and paste… So im guessing i need to add that is valid here somewhere maybe to cast failed section where would i go for is valid documentation it does not state where to use such code

 https://docs.unrealengine.com/en-US/BlueprintAPI/Utilities/IsValid/index.html

. jheeze what an effort to setup basic controls this rate ill be better with sprite sheets and a simple pacman animation to figure out the normal’s

Yes null means it missing something what its missing i dont know im new and one of the whole reasons im using the TUT’s. It could be as well that the character isnt editable on the animation part but as a new user im lost as to even know where to start like your telling me to pass an is valid but ive got Mycharacter, Mygame and numerous blue prints for animations and the like. Anyway the animation falls if i press x in the middle of the prone animation and it just constantly repeats so to me it seems like im missing a disable movement somewhere also going from “stand idle” to “prone”

Yea maybe ide be better doing something else and trying to learn more and come back to it later when i have more knowledge. thanks for your help

most code documentation in the old days gave you a use case
10 print “hello world”
20 goto 10
run

This would be a use case for the word “print” lets say

ok so when im in the animation blueprint itself i get it to print the string as soon as i switch to main UI with my level the string slowly goes

Nothing is plugged into the is valid node.

This one can work: Animation Blueprint Setup > BlueprintUE.com | PasteBin For Unreal Engine 4
The big blue variable is created by dragging it in and choose “get,” then right click on is and choose “validated get.”
You don’t need the Delta Time X variable, it’s just something I’m using elsewhere in the AnimBP.

@**ConradG **thanks missed that, setting it to mycharacter asset worked and now passes is valid? question, but the issue is still there with the null error at the very end of the game
could it be to do with server as it seems like its created one but after the error arises

Ive never done anything server wise in UE4 but have done many websites, server hosting, “basic v1” back in 1990 “pascal” in 1995 ish, some, c++, javascript, html, runescape server , minecraft, rust ,few e-commerce sites, torrent site <<<<<< even half of what ive done i should get through a intermediate right? i mean fallout 4 mod and sprite sheets for warzone 2100 graphical updates (dont really count as animation to me its .more 2dfx) which was the whole point of starting this tut :stuck_out_tongue:

@sigmagames the link you posted chucks back several errors

now im just resorted to mashing anything that looks like half to do with character save, compile, try, rinse, repeat and reset. You would think after 8-9 hours i would get to the place where i need to be at with shear lucky by now. Any way thanks for all your help. like stated ill move on to next tut as this seems an endless waste of time. As the character is valid its just not doing what its meant to. 99.9% my fault im guessing too… Its defo an issue with animations this was proven due to the fact i had same issue in my original source game when i transferred the files over.

IF anyone know why its not complied correctly for that matter ide be willing to listen to suggestions but as of now its burned far to many hours and im starting to not enjoy this side of stuff now.

anyway gL and thanks again