7.Multiplayer Setup & player starting camp

9.Create UI widget for Selected Building



Create a widget called Building Selected Widget
(shows in producing picture of unit in progress, and next 3 pictures of unit in queue)
image.png
rename the text and Set text “building name” is variable
image.png
R click on 2nd canvas, wrap with border:
image.png
A border layer is created, select it and open Brush column in details,
Change draw as to “Border”
image.png
margin set as 1,1,1,1 (mean 1 pixel border on every side)
image.png
Add a warp box next to the main box, name as ActionBox, set is variable
Repeat the same by warp with border, set draw as, and margin
image.png
Create a border covers up both boxes, set ZOrder as -1, Tints alpha 0.5, and grey color
image.png

go to graph, add variables building reference
image.png

Go to Parent Building Class, event graph, add sequence in event begin play
image.png
To set Show or remove widget during selected/deselected, add following nodes:
image.png
Now the widget works when selected the building.

Add thumbnail images to building widget:


Back to Parent building class, add 2 variables
image.png
Same as Image unit thumbnail, copy the image, rescale in 3rd party software, paste back in UE
Open First building, viewport, select the 2d image, name as Command Cetner in building name
image.png

Go to Building Selected widget, graph:
Split strict pin on Brush import of Set brush node
image.png

Make the “production image, progress bar, and next 3 pictures of unit in queue” invisible if building is not producing a unit:


Go to Parent building class, add variable, replicated:
image.png

Back to Building Widget
Create binding of visibility in unit production image layer
image.png
image.png

Create binding on visibility on Progress bar layer, unitproduction image 1,2,3 too. Copy and paste the nodes above to each of their binding graphs (not cap all screens here):
image.png


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.