Monokkel
(Monokkel)
February 3, 2019, 11:35pm
2579
Ok, some super quick support now. Only the stuff I can answer immediately without doing testing or putting a lot of thought into it. Sorry about that. As mentioned, after I hand in my thesis this week I’ll return to your questions with more in-depth answers.
Check the UpdateAbilityBox function in BP_Unit. It is called by an action as part of the select actor code.
crossmr:
@ No worries, get your PhD finished up, when you get back, I’ll attach an image someone uploaded which explains how LoS and cover work in Xcom: Enemy Unknown. As I suggested earlier, it seems that full cover blocks LoS, but only when the target or attacker are unable to step into an adjacent square to get LoS. So they can shoot around corners, but if you’re in the middle of a 3 tile wall, there is no way for you to shoot through it. Also if the unit is further back, they can’t get shot. https://i.imgur.com/eqnBg.gif seems like the real key difference between xcom and your kit is the ability to step out.
Started the first bit of work on touch controls, in the first image I added a little bit of code to BP_Ability this code checks if touch controls are being used, and if they are, it does the click check that I was talking about. I’ve also disconnected tick in the playercontroller for that mouse hover stuff. This also includes the changes I mentioned earlier. I’ve noticed the following (very odd) behaviour:
When Shooting, you can now click the unit once, and it will “hover” on that unit. You can now easily check the hit percentage before firing. However to actually fire, you still need to multi-tap. I have no idea why. By all logic, the next tap should try to run execute but it isn’t, you need to tap 2-3 times before it triggers.
Moving still works on a single click. Again, not quite what I’d expect here. Sprint, executes after a single tap. I was expect it to select the tile, then wait for a second tap to actually execute, but it does not. Edit: Nevermind, I just realized that Sprint has an override for server interact, I’ll have to change that one there.
a little more testing and I’ve gotten the following results: I tried rewiring all kinds of different things to see if anything helped this along, the answer was no. I tried adding a similar check in to the sprint ability but it didn’t seem to help, all it did was hover for a split second and then require 2-3 furious taps before it’d move. This may be related to some “jumping” of the location. It’s hard to print location data on an android phone, maybe I’ll have to rig up a debugging UI for this, but I am getting the sense that the location is jumping around. This may be related to the click attempt function in BP_AbilityBase. If the check hovered location fails (which I’ve ticked the touch box for) it returns a click invalid with a location of 0,0,0. Also, I wonder if you tap very fast, if the rest of the function works correctly. If you press touch, it’s supposed to (if not released) run a check for the location and set that, so that it’s available on release. I wonder if there could be a race condition here where if you tap too quickly, if the code doesn’t properly finish checking the location of your tap and may return an old location or 0,0,0 in some cases.
Ok, thanks for the continued reporting. Gives me a lot to go on when I get to check this. Have no suggestions off the top of my head, I’m afraid.
Hmm, well that is annoying. Those sorts of issues are always a pain. Have you tried fixing up redirects in the folders?
Thanks and noted
@crossmr Tagging you since perhaps you’ll know, and 's busy atm…
Would you (or anyone reading this) know how to create simple destructible objects in the grid’s current version?
1-I started with a Grid Actor as per the Teletransporter video shows, and notice my Grid Actor contains no variables whereas the video’s version has quite a bunch. I assume this too has been changed? Were they moved into a BPI?
2-I saw this comment about someone wanting the same thing from 8 months ago, but I’m having trouble understanding it:
" Hey man I realy love your work and I´m trying to do a game, where I need to destroy Items, which are on the ground, I allready have a Blueprint out of the Anim_Auto BP, which can be attacked, but dont attacks back/moves etc., the problem is that the game chooses it as a “playable enemy”, so the camera switches for about a secound to that Item and then back to the player and I dont find how to change it. Maybe you could help me, or just do a small video on how to make a attackable item "
I tried looking for this “Anim_Auto” bp he speaks of, but nothing is showing up:
Any thoughts on the matter?
I changed the name of BP_Unit_Anim_Auto to BP_Unit_Anim_Debug to make it clear to people that it is just intended for debugging and not a good starting point for your own units (for that I generally recommend duplicating BP_Unit_Anim). Could you be more specific about your issue with destructible terrain? At what step are you getting stumped?