@MarsOdysseus I think @ meant the “FindDistanceIinTilesBetweenIndexes” function (typo in the Iin ) rather than “GetDistanceInTiles”. I couldn’t find anything at least with the “get distance” words.
Alright, so I finally was able to make some progress, thanks to your last videos (: I will ask you Qs about different topics. You dont have to quote me if it’s tiring to deal with this forums’ post interface either, just reference the Q number and bam!
So my destructible mesh is a BP_Unit_Anim duplicate and can now take damage, be destroyed and not take part in the initiative order and combat.
1-Is this how you would go about creating these meshes for destructible terrain? Walls, roofs, trees, vehicles, etc? You mentioned before that doing this as a child of BP_GridActor would give one more control at the cost of setting some things up first. What sort of benefits did you mean by control?
Again awesome videos. It’s all valuable info! Here are some notes that I’d like to talk and ask you about. Regarding collisions:
Path Trace: At runtime, determines what tiles can be walked on. The trace is cast once per tile from above. If anything blocks its way, the tile is not walkable by units.
Range Trace: Determines line of sight - what tiles are eligible for an attack opportunity. It is cast from the attacker’s tile. If units are set to Block it, they would most likely block themselves during the trace and end up with no targets.
Cover Trace: At runtime, determines what objects can grant Cover (advanced grid settings).
Wall Trace: Allows the grid to automatically detect what walls should cover paths as intended. Needs the Trace for Walls grid setting to be active.
2-Where are these traces’ logic located at, and is it possible I can see in my editor a visual representation of the lines for understanding these better (and debugging)? This could potentially answer Qs 3,4 & 5.
3-The default tiles in the grid manager have a Block behaviour on Path Trace. Why is it that the tile is still walkable? Is it because the Path Trace treats the Default Tile as the end point of its trace, acknowledging it is the Gridmanager’s tile and thus is free to be walkable?
4-Your wall meshes are set to block Range Trace for obvious reasons. Is it correct to say that if a wall blocks this trace, the trace will not be allowed to keep going in that direction, say for example, two tiles behind that wall?
5-From where to where are the Cover Traces cast?
6-How hard do you think it would be to implement vertical grids? As in, grids projected on walls haha. If there is enough space and after a certain height, certain units can just walk on that. Just want to pick your brain on it and hear your thoughts.
7-I think the next challenge I’ll work towards is interactive terrain meshes, just like xcom soldiers can open/close doors when they’re one tile away from them. I’ll also work towards a bit more complex interactions, like making my unit move in these contextual actions: for example, enter a phone booth and close the door, or get into a vehicle, or climb up/down a tree. Any words of advice as to where should I start digging my nose into for this? I’m expecting I’ll have to create these as BP_Abilities like in your advanced example, then build a system that checks when units are near the correct objects to be able to perform this ability.
Anyway, keep doing cool a$s mothafukkin logic . Also +1 from me to focus more on advanced/firaxisxcom-like features and video explanations!