Hey , I have ANOTHER question for you, sorry for so many…
But in the example map you’re able to switch between your units freely during your turn, and they can all act in a different order. I’m trying to do the same thing in a new level using the Medic actor, and the Heavy Actor. But, during my turn I’m only able to switch from Heavy to Medic, and can’t switch back. Any idea on how to fix this? I tried searching this forum first but couldn’t find anything.
Again have to give super quick answers, guys. It will be better late next week. This might be my last post here until Thursday, though maybe I’ll have time for one more before then.
Hopefully it should not take very long to implement. I had already come pretty far, but had to put it on hold because of my thesis defense. If it takes longer than expected I’ll cook you up another solution. There are two somewhat hacky ways to do this; one hackier than the other. The first is to bind an event in your trap blueprint to the OnUnitEnterTileAnimate event dispatcher and play the trap effect and apply damage when the event is called and the unit that called it is at the appropriate tile (which you can store from when the unit enters the tile and triggers the trap during simulation). The other is to add a collision volume to the trap and have both it and the unit overlap the same collision channel. You can then visualize the damage on collision.
Ok, I see. I’ll try to think up something once I have the time, then. What you are describing is pretty close to what I’m doing. In fact the action system added after the refactoring is partly a system for storing variables for various things to animate separately. You could achieve something similar by having each unit have their own spline and array of location vectors, set these on start of movement and then reference them during movement animation.
Thanks for chiming in. This is indeed pretty different after the refactoring. In the newest version you should be able to get most of the way just by checking bWithPrevious on the movement animation of the second unit to move.
No worries about the questions. I’m just sorry I can’t answer them properly yet. Unit switching and turn order stuff is a part of the toolkit that I still feel is unnecessarily complicated and ripe for a small refactoring. I’m guessing the reason for what you’re seeing is that you’re using a different ability in each example? The code for switching to other units is defined within the abilities (since they are the interface through which clicking and hovering the mouse is interpreted). If you use the same ability as in the first map, does the same thing happen? Another possibility is that it is caused by a bug that prevents unit switching when there is only one faction in initiative and you are on the last unit. I thought I had fixed this bug, but maybe not. Do you have units of another faction on the map where you are unable to switch?
The first guess was the answer! I had switched the Sprint ability out with the general move ability, because I didn’t want them to be able to move twice by default. Once I gave them both the Sprint ability again they were able to switch between each other! I’ll have to take a look into the other abilities and see if I can just make it so no matter the ability they would be able to switch.
Hey , I hope you can remember what I’m referencing from 2 pages back, but I was asking about adding a status effect to my unit when they walk over a fire tile. I’m trying to follow your suggestion of adding it during the BPI_Interact > Event Interact, but Add Status Effect requires a reference to BP_Ability. Do you happen to have a solution for this? Thanks!
Hey everyone, sorry for the wait. I’ve now finished my PhD and am officially Dr. I have built up a bit of a backlog of other obligations in the last few weeks, so it will still take some days until I’m back in 100% support capacity, but pretty soon I should have more time for this then I’ve had in more than a year. Ok, so onto your questions.
Good to hear my guess was correct. To enable switching from any ability you basically need to check if a clicked index contains a friendly unit (as part of ServerInteract), and if so you can call the default click function contained in BP_Ability.
Let me know if you have any success with this. If not I’ll try to look into how to set this up in earlier versions soon.
This has been changed so that instead of having one global setting for showing tiles in range it can be defined individually for each ability. Open the ability your units are using and you can find the tile markers as hierarchical instanced static mesh components within the ability.
If you open the AddStatusEffect function you should be able to copy the nodes contained within to your fire tile. I don’t think there is really any ability specific code there.
Congratulations dr !!
I finished my phd 10 years ago, and I really know what a tremendous relief you must have right now after graduation (a 2-ton weighing stone came off your chest ). realy happy for you .
But there’s a price to it, after I’ve been silent for the last few months and I did not want to disturb you, I’ll come back to bother you with many questions :))
Yeah I was checking the code and noticed it did nothing with the BP_Ability reference, so I was wondering why it was there in the first place.
Also, congrats on becoming a Dr! I know I’m new here, but I’m glad I got to be here for such an amazing accomplishment Keep up the good work as always!
Hey , is there anyway I could check if my unit has the “on fire” status outside the ability system? I’m trying to do it inside my tile so it doesn’t add the same effect again, but instead refreshes the duration of the status back to its original length.
I’m also having trouble making the status effect do damage at the start of the units turn, but if you don’t have anything off the top of your head for this one no worries I can try to figure it out.
Thanks! And no worries, I actually enjoy providing support for the most part. It might have seemed less so the last few months because of the intense pressure of finishing my PhD, but don’t feel bad about disturbing me with questions. After all, it helps this thread stay visible on the forums, which is one of the few ways I get any visibility, since there is no way to sort the marketplace by popularity.
Thanks! Yeah, it does not really make sense to have that function tied to BP_Ability, I guess. Just a consequence of how I originally designed things. Might change that later.
As long as you have a reference to the unit with the status effect you can check it like so:
Hey , I hope you have a quick solution for this, because I’ve been beating my head against the wall trying to figure it out. For my “on fire” status effect, I have it running when I want to, and the unit is taking the damage, but the health bar isn’t updating visually so it looks as if my unit dies out of nowhere. Any idea why?
Take damage is a function that modifies the game logic (the value of current health), so it should not be called from an AnimateAction event, which are only for animation and other visualization (such as modifying the fill of the health bar). Rather than call TakeDamage you should call AnimateHurt.
Hey , a bit ago I asked about animating the health bar during the walk animation to show the units getting hurt as they walk through the fire tiles, and you said you were working on it in the next update, or I could do some hacky things to get it to work now. Could you possibly go into more detail about the “hacky” solutions? Thanks!
Hey, the hacky solution was a significantly more tricky hack than I anticipated. Sorry, but I’m going to have to look at this again tomorrow. I spent quite some time working on a hacky solution, but I’m not quite there yet.
Total newbie here and trying to make a Fire Emblem-esque. Can’t get a title screen to work. How would you go about adding a simple title screen (one that simply loads the example map in my case)? I tried doing it according to this tutorial and ended up unable to load the first stage (although the buttons worked well enough).
No worries, and sorry that it takes time. Not from lack of trying. I’ll find a good solution, though, and notify you when I have it.
Hey, sorry for the late reply. Check out the login menu map in Maps/Multiplayer for an example of how to login from a menu. The basic steps are to create a widget for your menu, add it to the viewport through the BeginPlay event of some blueprint (possibly the level blueprint). Then you can bind an event to a button or something else, which you can tie to the OpenLevel node.
Got these errors from the compiler after loading the next level, though. Are these because the Title Screen level that utilizes the widget does not have GridManager stuff in it? If so, is there any way or reason to clear and/or suppress these errors? They don’t seem to have any effect on the actual gameplay (my first level loads fine) when I test the game itself.
A few other quick questions I have on my mind, too:
How can I modify the camera to act more like a Fire Emblem game’s camera? (As in “fixed camera, 100% overhead view, etc.”).
I noticed that there is a blueprint called “BP_CameraControls”, but I’m not entirely sure how this interacts with the game and am a bit apprehensive to fiddle with it.
(I guess it would look somewhat similar to how Hydra’s Lair’s camera looks, but more zoomed out) EDIT: Never mind, found out you can easily do this by modifying BP_GridCamera’s position in the blueprint editor and then changing the arm length. Then you can even move bool config values around to remove rotation and zoom.
How do I turn off unit rotation? It’s kind of weird seeing my sprites turning upside down and then head-moonwalking towards an enemy lol. EDIT: I watched 's “Action System 2/3” Tutorial video and figured out the location of the unit rotation, of which I quickly snapped off and it works as I hoped it would.
Is it difficult to change the color or aesthetic appearance of the health bars? If not, where should I look to do that?
Should be all for now. Thanks for the help earlier.
EDIT: I have a feeling that a lot of my problems stems from the fact that I have a pretty good idea of how to accomplish something but I have no idea where things are located. I’ve seen a few videos from your Tutorial Series on YouTube and I noticed a Blueprints explanation video that was 2 hours and 40 minutes long. However, I also noticed that later on in the playlist there’s a video that says you overhauled the Blueprints’ organization in an update after your Blueprints video. Would it still be relevant to watch the Blueprints video, or would I just be better off watching videos from the tutorial past the update video? Or should I do both here?
Hi Alby, I see you already figured some of this out on your own, but I’ll try to help you with the rest. For your errors, this is likely because you are still using BP_ATBTT as the GameMode for your menu map. BP_ATBTT tries to access the grid manager and fails. Change the game mode in world setting to fix this.
For a top-down camera your solution should work fine, but if you have a 2D game, having an ortographic camera should work even better. Check out my 2D example game in maps/2D. It uses a top-down ortographic camera as well as sprites for units.
Should be simple enough to change the appearance of health bars. Create a duplicate of the health bar material and modify it as you’d like. Then change the material of the healthbar material billboard of your base unit to this new material.