Author Topic: [Scripts] HUD Menu!  (Read 396 times)

0 Members and 1 Guest are viewing this topic.

Lunar

  • Elite Member
  • *****
  • Posts: 907
  • The God of the Galaxy
  • Awards 1 year on site+100 posts 2 years on site+300 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
[Scripts] HUD Menu!
« on: March 18, 2017, 11:00:27 PM »
This was nested in a question someone wanted wondering how to create my HUD Menu I have created, I decided to make a post dedicated to it, if you want any animation/customization help PM me, here is how it all works...



Script: Menu



HUDText [option1] [option 1]
HUDText [option2] [option 2]
SetEventScript [ButtonX] [Scroll]
SetEventScript [ButtonY] [Select]
SetEventScript [ButtonB] [Close]




Script: Scroll



If
HasHistory [scroll] [player] [=] [0]
Then
History [scroll] [player] [+1]
HUDText [option2] [option 2] //reverts the option 2 back to normal so 2 arrows dont show
HUDText [option1] [option 1 <<<] //gives an arrow so they know which one they are about to select
ElseIf
HasHistory [scroll] [player] [=] [1]
Then
History [scroll] [player] [delete]
HUDText [option1] [option 1]
HUDText [option2] [option 2 <<<]
Else
EndIf




Script: Select



If
HasHistory [scroll] [player] [1]
//if they are hovering over the first option, its 1 history, 2nd is 2, 3rd is 3, and the last option is 0 (none)
Then
//do whatever option 1 does
History [scroll] [player] [delete]
SetEventScript [ButtonX] [] [none]
SetEventScript [ButtonY] [] [none]
SetEventScript [ButtonB] [Back] [Back]
ElseIf
HasHistory [scroll] [player] [0]
Then
//do whatever option 2 does
History [scroll] [player] [delete]
SetEventScript [ButtonX] [] [none]
SetEventScript [ButtonY] [] [none]
SetEventScript [ButtonB] [Back]
Else
EndIf




Script: Back



HUDText [option1] [option 1]
HUDText [option2] [option 2]
SetEventScript [ButtonX] [Scroll]
SetEventScript [ButtonY] [Select]
SetEventScript [ButtonB] [Close]
History [scroll] [player] [delete]




Now, that is just the basic framework for it, there is still more things you could do, make one menu option open a lot of different options, which then you would have to make a second Scroll and Select script so they can work with the second set of options, you could add animations, and a background for the menu.


assasin steve12

  • Fresh Meat
  • *
  • Posts: 1
    • View Profile
    • Awards
  • Xbox: assasin steve12
Re: HUD Menu!
« Reply #1 on: July 21, 2017, 01:07:47 PM »
For option 1 and option 2 do i put that in the script or fill that out?

Lunar

  • Elite Member
  • *****
  • Posts: 907
  • The God of the Galaxy
  • Awards 1 year on site+100 posts 2 years on site+300 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: HUD Menu!
« Reply #2 on: Today at 05:59:04 PM »
I dont understand the question, could you go into more depth?

Gary

  • Tester
  • Supreme Member
  • *****
  • Posts: 2911
  • Steam: Conmaan ... ... Discord: Conmaan #9586
  • Awards 1 year on site+100 posts Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners
    • View Profile
    • Awards
Re: HUD Menu!
« Reply #3 on: Today at 06:43:40 PM »
I dont understand the question, could you go into more depth?

For option 1 and option 2 do i put that in the script or fill that out?

HUDText [option1] [option 1]
HUDText [option2] [option 2]


               

Link to my youtube channel:
https://www.youtube.com/channel/UCo4rmelSOUB9YMM0Is-zWyQ