You can download the the Tutorial with Pics here.
Pause Game and Quit
1.
Create Widget Blueprint and name it inGameMenu. Open
it.
2.
Create two buttons and pull and drag text onto
them.
-Name the buttons to resume and quit.
-Name the buttons to resume and quit.
3.
Select the button and scroll down to events in
detail panel.
-OnClickedEvent press the plus sign
-OnClickedEvent press the plus sign
4.
This creates a onClicked (Resume_Button)
5.
Drag type Set Game Paused
6.
From Set Game Paused drag and type Remove from
parent.
7.
From Remove from parent type Set Mouse Cursor.
Then Right click and type Get Player Controller
8.
Now for the quite button. Go back to Design.
Select the quit button and click OnClick
---Same as for resume
---Same as for resume
9.
Go back to Graph
-add Remove from Parent (Not need ) and quit Game
-add Remove from Parent (Not need ) and quit Game
10.
Now we need a button to pop the menu. So, we go
Project setting – Input Action Mapping
-I choose number ‘1’
-I choose number ‘1’
11.
12.
We then open the character BP. I have first
person shooter.
13.
Right click and type menu
14.
Then drag pressed arrow and type Set Game Paused and make sure Paused is
check
15.
The Drag and type Create Widget.
-In classes choose the In Game Menu. The one you made.
-In classes choose the In Game Menu. The one you made.
16.
The drag from Create menue Widget and type Add Viewport
17.
Then drag from viewport and type set mouse Cursor.
-From Target drag and type Get Player Controller
-From Target drag and type Get Player Controller
18.
Test it and run.
0 comments:
Post a Comment