Tower Defense Starter Kit

Yes, you’ll have to call it from there as well. Later on, once you get everything working, you could try spawning the widget actor from there, & then store a reference to it. This way you won’t have to call the more expensive ‘GetAllActorsOfClass’ operation every time, & instead just use this reference variable to access the actor. When the game starts, you can destroy the 3D widget actor & clear its reference.

**Many thanks, Stormrage256. Now i see tower select menu appeared first, maybe I connect something incorrect. 20pm here so i will continue tomorrow. Thanks again.have a good time. **

Stormrage256, so can not understand why Tower selection menu appeared instead of Loadout

So i’m stack on calling Loadout menu here

Maybe try setting the Tower Selection widget component’s ‘HiddenInGame’ setting to True. When you call the Loadout menu, make it visible and the tower selection menu hidden. And the reverse when you’re calling the tower selection menu.

I think possible reason in my previous post. Can you check it please?

I think what you did there looks fine. The only possible issue I can think of would be the Loadout reference variable being set to null. But you can easily check that out by connecting the variable to a print string. If it’s not null, then the actor name will be printed out.

Print String printed nothing.

Well, could you post a screenshot of where you’re setting the value for the variable?

in previous post screenshot that you asked :-). I can not pin 3Dwidget, Default Value inactive. It says “Editing this value in Class Default Object is not allowed”

Alright, so I’m guessing that you haven’t explicitly spawned the widget actor. If that’s case, first spawn it using the Spawn Actor of Class node. Then take its output and store it in the loadout reference variable. Try printing after that.

It is closer! Righ Loadout in Game is spawned but still not worked

Just add the following code before the spawn node:

tdaresize.jpg

It’s the starting part of the default loadout menu display process. Basically, you’re initializing the array that will be used to store the list of towers selected through the Tower Selection Menu.

Hello. So it spawned. I used debugging method to check all for working. Seem array initialized but buttons in menu do not reacting on mouse click, just on mouse over

Try adding a breakpoint to the ‘On Clicked’ event of Tower Selection Button blueprint. It will help us narrow down the problem.

It stack on Switch on EHUDState

In the Game Mode blueprint, try calling the Update HUD State function with the new state as the Loadout Menu. Also just make sure that every time you try to display the loadout or tower selection widgets, the Update HUD State gets called as well with the required new HUD state information.

Do you mean connect it here?

Is there any way to remove this Loadout and Tower selection menus and just start game with some predefined 4-5 kinds of weapon?

Yes, but right before actually spawning the widget actor.