No need to apologize as it is not completely straightforward, since the answer depends on the ability. BP_Ability_MoveAttack and BP_Ability_Attack get their damage value from the Damage public variable in BP_Unit (like @behappyandsm1le said). These abilties were designed with the sort of game in mind where each unit has a single attack, so it makes sense to store the damage variable on the unit. In contrast, BP_Ability_Laser and BP_Ability_Explosive were designed for games where each unit might have multiple different damaging abilities. As such, damage for these abilties are defined in separate Damage variables within each ability.
i am working on the movement part, and I am using the experimental part of the toolkit. I have some problem I hope you can help me with.
so at first i used the code as it is (in my project) and didn’t change it, but I get strange behavior as so:
when I move my character to a ladder to climb he is doing everything as needed but when he gets to his final tile on top and stop, then he Disappear for a moment and then pop back into the grid (to the last tile) from above like he spawned there. any idea what could be the problem?
in the animation of climbing the ladder there is a unclean transition (a liitle jump) from the climb loop to the climb end?
I want to add special edges to all my fence so the character know he can jump over it. I do not want to place them as an actor( I have a lot of them) so I thought to make another trace for that but I don’t know if will be better to make it as a new function or just extend a already working function like the the Adds edges from a tile to neighboring tiles for multi-level grid . what do you think is the better approach for that?
Specifically the ladder climbing animation is the least elegant part of the toolkit at the moment. The animation I’m using is unfortunately not a perfect loop, which causes the small jump. I’m sure it is possible to work around it through animation transition lerping etc., but animation is admittedly not my strong suit. I will try to revisit the climb animation at some point, but I’m open to input from users more used to UE4 animation in the meantime.
Hmm, I probably wouldn’t be using the function for adding edges for this, if I understand you correctly in that the fences are purely aesthetic and don’t affect pathfinding. Using actors is the simplest way, but I can understand that you’d want to steer away from that if you have a lot of fences. If performance is the reason you don’t want to use actors you could use fence actors in editor, where the fence meshes are editor only and have a function at startup loop through all the fence actors and place ISMs on each of them instead of fence meshes. Using collision and traces is another way, of course. I’d probably make a new channel and set it up similarly to how I do things in the cover system component.
Sorry, I assumed question 1 and 2 described the same issue. I’m not sure I undersatnd what you meant in question #1. If you’re using the experimental ladders perhaps you haven’t moved the 3D widget appropriately to sit over the tile at the top of the ladder?
Good to hear! You won’t have to wait long, as I’ve included it in the next update, which I’m sending to Epic today. It is a tiny bit hacky, but it works. I’ve included it in its own “Hybrid” folder in the Experimental folder.
Just wondering if you could point me in tge right direction for a teleport strike. The way I have it now breaks the unit, causing it to show up on the edge of the map and be unable to attack or take damage after the ability is used.
Depends on what you mean by teleport strike. What precisely are you trying to achieve and what are you currently doing? Teleporting to the edge of the map indicates that you are interpreting a function that returns false as a grid index, causing it to return index 0 (which is at the edge of the map)
ok in order to be more clear on my problem here is the steps I did :
1.started a new project
2. copy all the code of the move to segment, QueueMoveSegment function and simulate move (override) into the bp_unit_unim.
3. place the unit on the grid with a ladder (the 3D widget appropriately sit over the tile at the top of the ladder ). 4. move my unit - the result is in the gif below:
so I got lost what have gone bad there, didn’t change anything
also if you use the experimental movement you have to make sure your grid manger location is at zero,if not you get wrong placement. is there a way to change it? I need my grid not to be on the 0,0,0
Ok, thanks for clarifying. Seems like I forgot to correct for the location of the grid in the experimental unit’s SimulateMove function. Here is a version of the function where I’ve corrected for the grid’s transform.
Less certain about your other issues, though, as I’m not able to replicate them. Do they still appear if you use BP_Unit_Anim_Ex instead of your own custom unit? Also, what is the precise height of the box the unit is climbing and where have you placed the ladder blueprint’s 3D widget?
thanks for the corrected function - problem solved
the other issues was solved too. it seems that In my abp_unit in the transition rule of the animation I had the blend setting duration set to 0.2’ I just had to set it to zero. sometimes I have this small things that I get stuck on them for hours
anyway sorry for the time, and thanks a lot for the help
Glad you figured it out, Leo Getting stuck on something small and stupid is one of the great joys of game development. Let me know if you come up with a better solution for the climb animation while working on it, as I’m not too happy with the current implementation.
First off, fantastic package you have here. Really appreciate how much work you put into support for it too.
Now I’m pretty new to UE4 blueprints as are a few other people I’ve seen here. I have had a number of searches but not found exactly what I was after so I thought I’d ask, sorry if it has already been covered.
If I was trying to create a free roam game that changed over to turn based for combat but was not using the grid (think Divinity with AP used for movement based on distance as well as abilites) would you suggest just starting from scratch using your turn based stuff as examples, or is there a simpler way to remove the grid? I’m guessing not since most things are tied into it in one way or another but just wanted to check before I spend time reverse engineering things.
I am going to make my own animation for climbing (this one is not good for me)
but in order to make the climb animation in the toolkit more smooth and flowless here are the steps to correct it:
in abp_unit_ex in the anime graph you have to change some of the transition rules settings. first go to transition between the idl_walk_run and climb start and change the duration to 0.1 (under the blend settings). next do the same for all the transition except from the last one that go back to the idl_walk_run (it should be at 0.0).
in the abp_unit_ex event graph go to the climb up event and disconnect the pan to location (its mess up the blend).
make sure the animnotify at the ladder_loop is at the very end.
that’s it ! you good to go. its not perfect by any mean(the position of the keyframe in the 3 animation is not the same from start to finish ) but it good.
hope its help, let me know if you need more Clarifications. its working good on my part.
Hey Loadout, happy to hear you think highly of the toolkit. I’m not sure I’m able to give you an unambiguous answer to your questions, though. If I was to make a game like the one you describe myself I’d use the toolkit as a base, but then I naturally have a very good overview of everything the toolkit does, including what functionality assumes there is a grid and what does not.
As this will likely not be the case with you you might potentially lose a lot of time trying to figure out what can be used and what cannot, which means that a clean slate and using the toolkit for inspiration might be the best answer. I’m not certain, though. With the newer version of the toolkit things are very modular and most gameplay stuff is defined in the abilities. For the most part you would be able to use stuff like the turn order, action system etc. mostly as is, while you could implement your gameplay within the abilities.
For instance, you could create an ability that instead of using RunPathfinding to find a movable area on the grid, uses UE4’s navigation system to find an area you can navigate to within a radius. Then in the ServerInteract event for the ability, instead of checking the movement cost of the clicked index and using that to reduce AP you would get the clicked World location and check it against the navmesh. Stuff like that.
So yeah, a bit difficult to answer. If you like how the toolkit is organized it is probably worth a try, but if it keeps feeling like you’re being constrained by my grid based design decisions perhaps start from scratch instead.
Thanks a lot, Leo! I’ll test out your suggestions and will add them to the next update.
To clarify I’m trying to make the damage modified when certain units hits each other and i was wondering where i can modify that in the blueprint as i couldn’t find the health variable from within the Bp_Unit.
BP_Unit has two health variables. CurrentHealth is the one you most likely want to modify. MaxHealth is primarily used to inform the health bar. These variables are both in BP_Unit’s public variables. Perhaps you cannot find them because you’re looking for them in one of BP_Unit’s child actors and have forgotten to select show inherited variables? Note that CurrentHealth is used to inform the game logic, but modifying CurrentHealth will not lead to any visible changes for the player. For this you need to queue an action to ReceiveDamage. Check out my video tutorials on the Action System if this part is unclear.