I can chime in on this A mouse look sensitivity around 10 feels pretty good, but you can adjust it by feel. It is a new variable added to BP_GridCamera. As for clamping the pitch you can go as extreme as min: -89.9, max: -5 if you want a range perfect top down to just above the floor. You should indeed use a new input action that you can set up in the input settigs in the project settings. Iāve personally keyed it to middle mouse button.
Thatās awesome, thanks!
Have you ever had an issue with the Jungle Raid map where once you shoot with a unit, the game freezes. Iām just using the default characters but I donāt see where itās hanging up. If you could point me in the right direction, it would be appreciated.
Not sure if this was asked before might have missed it. Are there any games using this currently available? I wanna check out projects other people have released.
Hmm, well thatās not good. Have you made any modifications? Does it happen every time a unit shoots and how does it freeze? Do you hit the loop limit and the game crashes or is the game running, but the game doesnāt proceed to the next unit in the turn order?
No modifications to the jungle raid map, nor any of your code.
Yes, it happens every time.
Youāre locked out of the game (canāt click on anything)
Once it freezes, I stop the game so I donāt know about hitting a loop limit. Unless the loop value is extremely high, it should have triggered.
Game doesnāt crash, it just locks you out (yes, you canāt proceed)
Have you been able to repro this? I may just have a corrupted install and could try re-downloading.
Edit: I removed the local content and re-downloaded the project and it works OK. Something must have gotten corrupted.
Question from discord āIām having trouble getting a door to open and close and be able to walk though it. So far this works but only for a door facing south. I used a child of the south wall blueprint to make a door. What I was trying to do was get the rotation of the door and have that go into the direction ENUM switch and use the correct get tile in direction so I donāt have to have different doors for each directionā
The execution pins from āset relative locationā went to a rats nest of āGet tile locationsā and a switch on EDirection. I actually got it working somewhat. with two box triggers on the same door seemed like a better solution. Seems to work on start in North south east and west. But iām guessing that will cause problems if I have lots of doors on a level? The AI also does not go though the doors and cant detect me at all even with the stealth system disabled. Could that be related to the issue of if the door opens and your turn ends you can no longer move though the door but you can if your turn does not end?
Ok, thanks for letting me know. Good to hear that a clean reinstall solved it.
Hi, so this is something I would personally solve with the new UpdateTilesInRange function, which will help you not having to hardcode all the directions. If you use UpdateTilesInRange with bTraceForWalls set to true, you can input the door ar the origin index with a range of 1. You would have a collision volume overlapping the tile of the door that blocks WallTrace. If you open the door you set CollisionEnabled to false for this volume and then run UpdateTilesInRange. This will work for all directions.
As an aside, there is an issue with the blueprint you provided. The update execute pin in a Timeline executes every tick while the timeline is running. That means that in your code you add edges probably a hundred times or more. You should instead have called those nodes either before the timeline or on Finished.
For the AI I will need some more info. The AI has no way of knowing that doors can be opened, and just work with the pathfinding they calculate at the start of their turn. For them to consider moving through doors you might want to āopenā all doors at the start of their turn (without animating them) so that the AI knows it can pass through them.
Hi ,
Wanted to let you know that we FINALLY got the UpdateTilesInRange function working. It looks like we were having trouble because the subgrids we were using werenāt inheriting from the grid_actor blueprint so we couldnāt cast properly or something, we werenāt getting access. So we are using new ones inherited from the grid_actor and it works! It updates the tiles correctly when they spawn and correctly prevents the player from clicking outside of them.
Did you have an update though on how we can solve the issue we mentioned earlier about getting players to be able to share a space?
Thanks!
Hello , I have some questions about sub grids, working with hex tiles
is there a way to make sub grids say 10 x 10 shaped like round or diamond shape,
what would be easiest way to make a sub grid with a hole in the center (remove certain tiles).
If these questions have been asked and answered could you point me to the page numberā¦
Thanks.
Hi Mono
short one i guess. Where can I change the mesh/material of the spline and move/range tile appearences? Changing it in the gridmanager does not work for me completely. Thank you
Glad you figured out what was not working. Apologies that I was not able to discern what you were doing wrong.
As for units sharing a space, did you get to test out the files I sent you? It had tile sharing that worked with some assumptions about your game.
Iām having a hard time visualizing what you are attempting here. Think you could try to draw it?
The best place to change the appearance of the move/range tiles is in the specific abilities you are using. Just set the Static Mesh directly in the Details of the TileMarkers component.
The appearance of the spline is still defined in the Grid Manager, though. You can change its value in the SplinePathMesh public variable of BP_GridManager.
Hi ,
I didnāt know it had tile sharing. I tried testing it but I am not sure how to get it to work. For testing purposes I placed 2 units, one as player 0 and the other as player 1 but it says waiting for other player to arrive. Is there no local option?
I also tried setting both as player 0ās units (which my game will not be doing) and they can only start on a shared space but wonāt share a space afterwards. Same if I set one of the units as an enemy/other faction. Is there an option somewhere to allow space sharing between players to turn on?
Thanks for the replyā¦ I am having a problem uploading pics hereā¦ I will try to explain better. (using hex tiles) Drag a sub grid into level, set size to 9 x 9.
In the very center, I would like to remove the tile including index, mesh etcā¦ so there is a hole. Is that possible without messing the whole grid system ?
Or is there a way to make the sub grid place tiles on a static mesh like the āoldā height map example from long long ago ?
Hope this helpsā¦ if not I could pm you some images.
Thanks.
Thanks for the help and sorry for the late reply took a break from unreal to work in blender. In the end I went with a Simpler approach. I removed collision from the doors so the player can see what tiles they can move to without opening the door. What Iām thinking of doing now is setting up a animation trigger when a unit gets close to a door they will kick it open or something so they donāt just clip though it.
The shared files might not be the best example anyways. Lets start with the basics and take this one step at a time, then we can figure out what works along the way. So first let me give you a basic setup to allow units to end their turn on the same space as other units.
Modify SearchAndAddAdjacentTilesCustom1 in BP_GridManager so that tiles are added to the open list even if there is a unit on them:
https://i.imgur.com/QhlYXiG.png
Then make a duplicate of BP_Ability_Move. In PlayerActivate you can skip the branch that does not display move tiles if there are units on them:
https://i.imgur.com/cnz01QF.png
Next in CheckIfValidTarget you return valid even if there is a unit on the tile:
https://i.imgur.com/DRZvSTS.png
Now place a couple of units. Set their default ability to your new move ability and their PathfindingType to Custom1. And voila:
https://i.imgur.com/4S7YsPx.gif
There are obviously a lot of limitation here, but this is a good starting point for a discussion for what you need and what you donāt need for your game. What here is missing that you need in your game?
Ok, so like a donut? Is it important that this is done using a subgrid? Can it be done at runtime? If so, FindTilesInRange with a minimum range of 1 can be used. What is the gameplay purpose of these subgrids?
Ok, sounds like a reasonable solution. For splitting up movement into multiple animations, such as stopping to open a door etc, I recommend looking at the SplitMove example map in Maps/Experimental.
[quote=ā, post:3470, topic:21930ā]
Ok, so like a donut? Is it important that this is done using a subgrid? Can it be done at runtime? If so, FindTilesInRange with a minimum range of 1 can be used. What is the gameplay purpose of these subgrids?
Yes like a donut and and being done at runtime would be perfect. Thank for the help and do not spend to much time on this, its not that important. I have to go out of town tomorrow and will
reconnect with you when I return in a week or two
Thanks again .
-
Yes thanks. I searched hours because it was working in a blank project until I found out, that this will not work when you have āuse Decalsā on true. Where can I change it when I want to have it active?
-
So for the spline works too but where can I chance the color/material? As everything still shines bright white after changing the static mesh.
-
Where for āAbilitityMoveAttackā is for the AI defined, that after movement, with having no AP left, it still has the free attack/Action? I found for the player and changed it, but canĀ“t find it for the AI.
-
I am trying to access the float for damage within āBP Unitā and parse it to āAnimate Deathā like its done the same way for āanimate Hurtā already. But when I conect the pin, it will givge me the errormassage once it tries to access it during gameplay. I have added a screenshot.
Thank you Mono
Hi ,
This is super detailed and helpful, I implemented it with no issue. I appreciate it!
Curious though, my blue move markers are gone now. Where did you have me turn those off in this breakdown?
As far as this issue goes we now just need a way to differentiate visually that multiple players are on the same space, we were thinking of maybe adjusting where theyāre at on the space, so not every player will be centered on it.
Hello. Thank you so much for making this tool. I just bought it yesterday and itās looking very informative and useful for what Iām doing! Iām still relatively inexperienced at coding and Unreal Engine, but I have a question.
I added attack and defense stats that determine how much damage an attack should do to a target. The attack is added to a unitās equipped weapon and put into the damage variable that was already a part of BP_Unit. In the Take Damage function I have the targetās defense subtracted from the damage to determine how much health should be lost. It seems like its calculating the damage correctly, but the health bar is not displaying properly. It is removing a percentage based on the damage calculation without factoring in defense, yet the unitās current health stat after being attacked is correct. This leads to situations where the unit disappears from the grid as if they died once their health bar reaches 0, but they can still be moved around and have health left (although they cannot attack or be attacked).
Basically I would like to know how to correctly update the health bar and what I would have to change with my current system to do that. Sorry if this is a silly question, I just canāt figure out what is going wrong.
Hi Munch,
maybe I can help you out. In my case it has worked to to modify the damage within the ability function āExecute Abilityā that is used. I have just createt functions within the ability (lets say āmove attackā) I have attached a sreenschot for example critical calculation. That works fine on my side. What you will maybe have to take care about, is that in the first āself createdā function the damage of the specific unit is set again to normal, by getting the damage value of the current unit. You could do this even in the same ability though, but at least in my case it is not needed.