[SUPPORT] Advanced Turn Based Tile Toolkit

Unfortunately it’s not exactly a standard system. Most of the weapons will likely end up having somewhat bespoke camera actions, like the sniper kill cam isn’t really going to run the same on anything but the sniper rifle. Luckily it’s mostly a cut and paste job, as I’ve laid out most of it on a separate graph. Just need to insert the binds and some other logic to handle a few things. I spent the night bug hunting it, and it seems solid now, so I can go ahead and start creating the various cameras I need and tidying that up.

Scratch that. It’s not solid yet. There is some lingering bug. It seems to work for a few rounds, and then something seems to go out of sync with it. After working through multiple rounds and multiple shots, then suddenly it’ll get to a point where attempting to shoot has it start the camera action and then it ends the action without doing anything. Doesn’t make much sense to me. I must have something wired incorrectly but even with breakpoints, I can’t seem to see anything. It comes back to the delay and queue action on the event graph and instead of continuing on, if I’m stepping through the debug just cuts out there. In this latest test where I was only doing aimed pistol shots, and nothing else, I must have gotten 8-9 rounds in with about 2-3 action cam runs per round before it started acting weird. One odd thing that pops up during the debug is that sometimes, the “OwningUnit” on the pistol aimed ability returns “none”, which doesn’t make any sense to me. Interestingly while it returns none, the target still returns the correct target value. I’m also getting some errors in the log which I’ll post if they tell you anything. it seems somehow my unit is getting unset? or I’m losing track of it, but I’m not sure how. I’m not leaving the function anymore. All the camera work is being done in the shooting ability using casts to the camera and binds within it.

This actually seems to be related to a unit dying. I notice when a unit dies, for some reason there is a slightly extra delay. I did change the dying animation, but I put the anim notify on it that it is supposed to have, and no bug seems to be produced when shooting without all my special camera work. I just ran for 9 rounds without a bug, and then finally killed 2 units both that produced this slightly odd pause after their death and after that, the shooting ability started messing up with the camera. I’ve just verified this. I started another game and moved everyone in close, so that I could kill someone as quickly as possible. As soon as the first unit died, the very next unit couldn’t do a pistol shot with the special action camera. This is really really odd. It also gave that same error that I posted in the screenshot, but doesn’t really give details as to where this is happening. The output log gave that same yellow error, but the error log didn’t produce any errors that could be clicked to show where in the blueprint the issue was happening. I’ll post some screens of how I changed the ability. What I’m seeing in game is that when this error is generated and it messes up, it seems to be getting to the lerp, the camera slides and then the ability suddenly ends without anything else happening. But it does seem to be shooting in the code. e.g. units are taking damage and will “die” on the code side of things, but the animation doesn’t match because the “render beam” and other second half code from the ability never seems to get run.

I’m also going to attach a video so you can see what happens. this time it was slightly different. I was able to shoot one or two times normally after the unit died, but then it went sideways on a move, you can see the camera jump away before the move is finished and the walking sound just continues. After that shots which use the action cam don’t work, but the shotgun blast (which doesn’t use it) works fine. Each time I had an action camera shot fail, one of those yellow faction errors was generated in the log. It also looks like my error handling code was working somewhat correctly. For my test I had the units to always use the action cam 100% of the time, but the two shots after the unit dies are both done with the normal camera and not the action camera. That means the owning unit was being read as “none” for those shots.

After more testing, this seems entirely related to a unit dying. A unit dying does something to break this and all my other camera work, and I’m not sure what or why. Any insight on that might be appreciated. I haven’t changed anything regarding death except to return a bool on “take damage”, but I don’t use that now for anything and to change the death animation. I put the included one back in, but it seems to make no difference. It also doesn’t matter how the unit dies. I killed the unit with regular attacks (no special cam) and special cams were still messed up

One more note, I opened up that fresh unedited copy of the toolkit that I made and ran the jungle map, whatever this “unit” bug is, is present there. If you start the toolkit and start the jungle map, and then click on a grenade ability, you’ll get that error in your error log as soon as you click on the ability. This will show itself right from the beginning of the game.

**EDIT: It seems that I had forgot to untick loop on the dying animation on one of my animation blueprints causing it to loop over and over. This fixed the camera issue, it did not however fix the “unit” error message which is sometimes returning no unit. This seems like a fairly serious bug if the game suddenly loses track of which unit it’s currently controlling. **

Camera performance isn’t bad on mobile, but it’s going to depend a lot on the map in question (based on my assets). The large bank map which has a lot of stuff on it, has a slight FPS dip when I do a spinning camera move and the bank is in the back ground. I believe these assets were made with mobile in mind, but I am going to do an LoD pass on those at some point just to be sure. Overall I’m quite satisfied with the performance on mobile. This isn’t something that’ll run on weak phones, but even on 2-3 year old phones it works okay.

Unfortunately it only happened once and it was on a shipping build on my phone. I haven’t seen it happen since either. If I have a chance while I’m digging through the blueprints I’ll see if I can spot any nodes in there that might round something differently.