I am making progress but I have run into a bit of a snag. Under BP_ThirdPersonCharacter I created a skeletal mesh and animation swap. I am able to get the swap to occur post combat in the BP_TurnManager_Hybrid by inserting LocoMesh before the LerptoThirdPersonandPossess node in EndTurnBasedMode. The problem I am having is finding the right spot to insert the switch back to TurnMesh(the original ATBTT mesh and anim) so the turn based system operates normally. I appreciate your time and consideration.
I’ve just tried the asset out after picking it up last week and I’m having an issue.
Tested this in my project and a new empty project.
Create landscape, create BP_GridManager_Hex. Align the two roughly. Place a BP_Unit_Anim on the grid. Play. Works OK
Same thing but sculpt the terrain a bit and enable… Procedural → Heighmap set to One Level. Does not work, the movement grid is offset and the guy wanders off the map when you click to move.
If I do the same test with square grid using BP_GridManager there are no problems. But I want a hex grid not a square one. So not really useful except to show that there seems to be a problem with the Hex version and not just a problem with what I am doing.
Hey everyone, UE4.23 is officially out and I’m working on an update. This might take a bit longer than usual as the update seems to cause a few more issues than what I’ve become used to. Should still not take terribly long, though.
Speaking of issues, private messages on the forums do not seem to work properly. I can only see the titles of the messages people send me, and the same seems to go for the messages I send to them (I can only see the preview text in my e-mail notifications). So if you need to get in touch, and have a reason not to post it in this thread, send me an email to [EMAIL=“firstname.lastname@example.org”]email@example.com. I hope @Fireskelet and @kjmccloud see this, as I have not been able to read their messages.
Happy to hear you figured it out
Change the length and rotation of the camera spring arm component. Setting the yaw rotation to 0.0 should work for your purposes. Also, adjust the ZoomFloor and ZoomRoof variables for the max and minimum zoom distance. Make sure the SpringArmLength is initially set to something that is not outside these bounds.
For your second question you can call the PanToLocation event in the grid camera. You might have to disable bUseFollowCam or at least clear ActorToFollow before doing this to prevent the camera from following an actor.
Not sure I understand. You just want a sensible point for when to switch to the turn based mesh? Are you trying to do something different from what I am doing or are you simply struggling to replicate what I have done? A good point to call your event would likely be somewhere in the BeginTurnBasedMode event in BP_TurnManager_Hybrid, but I might be misunderstanding your question.
I’ve been able to replicate this issue. Thanks a lot for letting me know. It seems to be a specific bug for OneLevel heightmaps for hexagonal grids. With Multilevel or heightmap disabled there is no issue. I’ll make looking into this a priority and will let you know as soon as I have a solution. Probably a simple fix.
For the time being I recommend setting the grid manager to location 0,0,0 and moving the rest of the landscape in relation to the grid manager. This prevents the issue from occurring. I generally recommend doing this anyway, as it makes adding your own custom functionality simpler, as you do not have to correct for the transform of the Grid Manager (which I have obviously forgotten in this case)
Edit: Found the issue. Add the following to BP_GridManager_Hex:
Thanks for the quick fix. My terrain is about 3x3km and I’ve got the grid scaled up so each hex is around 100m. I’ve got everything offset so the center of the landscape is at 0,0 to minimize any floating point in inaccuracies at the extremes (considering going larger at some point, but using this as my minimum viable size). Having this issue now is a little serendipitous, as I’ve now learnt that the functions needed to convert to and from grid and world space exist
Hey Monokkel, I am having trouble recreating what you have done. I want to use my MannequinCharacter for movement/crafting/interaction etc. while out of combat instead of the BP_ThirdPersonCharacter. It seems easiest to leave the BP_ThirdPersonCharacter in place for the turn-based combat. I think the trouble I am having is pinpointing all the spots that reference the BP_ThirdPersonCharacter outside of the turn-based mode that need to be switched to my MannequinCharacter. Thanks again for your help.
Good news, everyone! I managed to get the update done a lot quicker than expected. I did an intense bug fixing session and got everything done in a day. I’ve sent it to Epic, so it should hopefully be up in a few days. This version does not add any new features, but fixes several bugs, including workarounds for engine issues with UE4.24. Se my Trello for details.
@Zennisin I think I finally managed to figure out the touch issue as well. At the end of the TouchInput chain of events in the player controller, set Touch to true. Also, disconnect the EventTick of the player controller. Sorry for the terribly long delay on this. I can partially blame technical issues with my phone, but I should still have gotten this done earlier. Especially when it turned out to be so minor a thing.
Ok, I see. Any reason you can’t just scale the meshes down? Are you planning to be able to zoom down extremely close to the tiles?
Hard to know what you are missing without seeing your code. Are you using a similar child actor setup? In my hybrid example the player unit has the third person character as a child actor. It uses this child actor as the visual skeletal mesh for both the turn based unit and the third person character. For looking through my code, the relevant blueprints are just the ones in the Hybrid folder. Primarily the unit, character and turn manager blueprints.
Sorry. I knew my edit was confusing. I meant that I had everything connected up right(I think) It wasn’t working like I said. Then I was fooling around with stuff before I took that screenshot where that event is disconnected and that is when I took the screenshot. That gave me a compile error. Reconnecting it just leaves me back where I was of the animations not working. I just added the disclaimer so you didn’t look at it and say “ahh here is the problem.” I meant “pretend like it is connected and tell me what else is wrong.”
Now in your reply you mention 4.23 being an issue and I think I was using 4.23 so maybe that is why it is not worked ng. Thank you
Through some recent testing since last time, this line of code for some reason (First picture) doesn’t make sure that it makes the unit stop after attacking the same target twice if the hit was super effective. I was thinking of putting a bool into this section of the blueprint (Second picture) to make it so that if it gained a set number of AP to much it could stop the unit. Would that be possible, asking for a second opinion here and maybe another mind to figure this out.
Fair enough. I don’t know whether that is true of Unreal Engine as well. While you’re still early in the project it is probably a good idea to look into this stuff and choose whatever is likely to cause the least headache down the road.
Oh, terribly sorry. I completely misread your last comment. Your language was clear, so my bad. I believe the problem you’re having is also not something you’ve done. I think one of my later updates might have changed stuff so that the approach used in my tutorial video does not work anymore. I will look into it, but it might take me a bit of time. My apologies for the confusion.
Yeah, that should probably work. However, I’m afraid I’m not able to keep straight in my head exactly what you want to achieve, which makes helping you more difficult. Could you describe what you want in more detail? You want a game where you get extra attacks if you make a super effective attack, which is repeatable if you keep attacking new units? So every time you attack you gain a new attack until A) you land an attack that is not super effective or B) you attack the same target twice. Is that a correct description of what you want? How does movement factor into this?
Yes I want to make sure its only repeatable if you attack new units that are super effective, and should you attack the same unit twice it ends your turn. The movement factors into re-positioning onto panels I’ve made that change the element type of a character. However it should stop if its not effective or does normal damage to a target that isn’t super effective.
Since your abilities seem to work a bit differently to the default abilities I would recommend replacing some of the unneeded stuff instead of working around it. No need to reduce the AP of the unit and then increase it again if the attack is super effective. That makes things a bit messy. Rather, remove the default functions where you pay an AP cost. Rather, reduce AP only in the situations where you want to; namely when you make a normal attack or attack a unit that has already been attacked. That should be cleaner and should make it easier to work with.
That’s weird. You shouldn’t get any issues with a header file if you’re working in blueprints. DamageModifiers is your custom variable, right? Are you using C++ for anything or are you attempting to nativize or somethine like that?
Heya Monokkel, I have been working on switching out the ThirdPersonCharacter with my own MannequinCharacter in the Hybrid folder. I have tried it several different ways and can’t get it to work. Any chance you could help me out with the steps necessary? It could be helpful to others in the future. I really appreciate your time and expertise.
Not sure if I am in the correct Thread.
What a beautiful written engine, well done.
Just a quick question: I am trying to find somewhere in these threads, I am sorry if it has already been discussed, being able to stack units on top of each other.
would I need to add a array for the add and also use mouse right to be able to select the tile or am I still able to use mouse left.
Thanks for the kind words, Matt! For your question it depends on what you mean. The toolkit allows for multi-level grids, so you can have multiple units on overlapping tiles. For multiple units in the same tile it can be more or less tricky depending on what you want. If you want something like Civ, where each unit has multiple skeletal meshes but still constitute one unit as far as game logic is concerned, that is not terribly difficult. If you want multiple separate units on the same tile that can be selected separately and split you will need to do some significant tinkering. You would want to replace the GridUnits TMap with a new map that contains nested arrays or sets of units and would need to rewrite major parts of all abilities, AI and tile selection nodes to recognize this appropriately. Which of these is it?