Everything was working fine untile I have changed the AI Controller as a part of refacoring lecture. The AI tanks are not moving at all now after the compilation even when my tank moves. The most important part is that I have weird error coms out at te beginning and olny once:
And my code:
But I think that it only appear once and the function has been commented out from tankAiController. What is weird I am not able to see the logs coming from the AI tanks when I was trying to debuge. It’s like the Tick is not working at all. Anyone have an idea what’s going on :)?
I know that the problem matching that line of the code. Problem is that I was desperate so I have copied code from the slides and now it’s exactly the same and problem still appear, but Only once, what is weird - The game works fine, tank is aiming ,barrel moves. only AI tanks are not moving.
Been a bug since 4.13+, the PlayerController tick function gets called in the blueprint editor. Meaning if you have any code in your tick function that would call GetPawn() would return a nullptr since it wouldn’t exist in the world yet.
Also your UE_LOG is after the ensure check. Meaning if that failed the UE_LOG wouldn’t execute. So either PlayerTank or ControlledTank is nullptr
Right so it means that I have to use github repo to clone my project to the state before I was moving projectile as it was ticking then. It means that projectile in BP has to be removed before changes then. I will try it soon and let you know if it solves the problem. It’s nice to refer to it somewhere in the lectures as many people like me uses newest version…
So one of two problems solved as still my tank is not ticking. Seems like I have to live with it…
Just to make sure I have moved Log before ensure and still I have the same problem, Its not printing anything at all.
yes, I just went really simple way of trying to understand where the problem is. And…
This part has been NONE…!!! I have no idea why and when it has changed and I am really stupid that i haven’t checked it at the first time… Sorry for the trouble and it’s sorted now