Right now I’m just sorting out the execution flow and how it may differ between the two abilities.
Touch Input->ClickAttempt->ServerConvertLocationToIndex->ServerInteract(FunctionCall)->ServerInteract which seems to be implemented on BP_Ability. As it both movesprint and the various shooting abilities have BP_Ability as their parent. With both abilities having BP as the parent, I’m a little confused as to why they behave differently (move as 1 touch shoot as 2 touch). I’ll keep digging in to those.
I’m going to try to adjust the camera glitchiness today where it sometimes refuses to pan or jumps around or at least see if I can figure out what is causing that.
The idea is that the camera follows the bullet to the target, from the snipers gun to wherever the target is. I have it called if the target would die from the damage received on the sniper ability that time. I’d like more ability to completely interrupt the ability, and I almost had it, but then it just refused to end the ability. On some moves I’d like to do a bit more cinematic camera work, but because of the decoupled system, I’m struggling to see where and how I can interrupt an ability. Obviously the best place to interrupt the ability is before the unit/animation is split. The problem I ran in to, is how to come back to the ability? I had it set up where in the shoot function, it would first calculate the random damage and compare it to the target’s current health. If it was going to kill the unit, then it would branch skip take damage but return a new bool “bTargetDead” which would be checked in the main event graph, which would then skip render beam and call a function on the gridcamera which would do the stuff I wanted, it would also pass a reference to itself (the ability) to the gridcamera, which, on finish, could turn around and call back to a function on the ability to call “end ability” (after calling take damage and queue action for the death at the right time). Sadly this didn’t work. The camera stuff worked, the unit died and animated at the proper time, but when the grid camera called back to the ability to run “end ability” nothing happened. The ability didn’t end, and I couldn’t move on to the next unit. You can see the sniper ability around 8:17 in the video I posted. He gets the kill shot on a unit and there is a bullet chase, but that’s not quite how I want it.
For the sniper ability, moving the camera from the sniper gun to the target fast enough can kind of get this in sync, but it’s faster than I’d like, and I can’t do any of the other camera stuff I wanted to do in this case. For other death camera sequences I had in mind, it isn’t as easy, unless I set it up so the camera ignores the target and focuses only on the unit initializing because I can control that easier. What I need is a way that I can pause/interrupt an ability for a special event (usually a camera and, but not always, animation sequence), then go back and end that ability when I’ve handled that. Calling a function on the camera, which called a function on the ability, really didn’t seem to work.
Yes, it’s solved, if people want to have multiheight (1/2 and full cover) on a tile they can, they just have to make sure that any squares that should have half height cover are scaled to at least 0.6 and not 0.5, or at least over the height that they wall trace at.
I don’t recall this happening the first game. As I play more games against the AI, I’ll try and make notes on any odd AI behaviour I see like this.
Just played another game and mid-way through the game the same unit had issues. It ran around, took cover, fired a few times, but then at one point they were on the opposite side of a window with an enemy unit and had a chance to shot gun blast in the face and just ended their turn. Nothing to do with the window though, because other units had no issue, Right beside it was another unit in the same situation and it fired through just fine. I’ll see if I can debug and find something wrong with that particular unit. I thought I had cleaned up an errant collisions, etc on their components.
There is one sort of large issue I did notice with the touch controls. The UI doesn’t block them. So if you fat finger your abilities, or click the information box, then you can accidentally click a move square. I’ll see if I can figure out how to block that from getting through to the grid.
Edit: Regarding the unit giving up, part of it seems tied to the shotgun. Is there a trace done from the end of the gun when checking to shoot? I saw another unit with a shotgun also exhibit the same behaviour. In front of the window, another unit on the opposite side, they couldn’t shoot (they normally can there is no minimum range). They just skipped their turn. They didn’t even step back to fire. So i’m wondering if there is a trace done from muzzle or something that the AI is failing on because the shotgun muzzle would be in a different location. The gun is otherwise set no collision to avoid that issue I had before.