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

0 Members and 1 Guest are viewing this topic.

Lunar

  • Elite Member
  • *****
  • Posts: 931
  • The God of the Galaxy
  • Awards 2 years on site+300 posts 1 year on site+100 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: 931
  • The God of the Galaxy
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: HUD Menu!
« Reply #2 on: July 23, 2017, 05:59:04 PM »
I dont understand the question, could you go into more depth?

Gary

  • Tester
  • Supreme Member
  • *****
  • Posts: 2924
  • 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: July 23, 2017, 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

NaeZo, the MLG

  • Jr. Member
  • **
  • Posts: 12
  • HELP ME GOING BACK TO TMF !!!
    • View Profile
    • Awards
  • Xbox: NilsDx
Re: HUD Menu!
« Reply #4 on: July 25, 2017, 11:52:59 AM »
I already have done this in one of my project I can't finish... And I added a scrolling menu animation when i press X


CAN SOMEONE HELP ME WITH MY XBOX 360 ACCOUNT PROBLEM PLEAAASSSSSEEEE ???????

Lunar

  • Elite Member
  • *****
  • Posts: 931
  • The God of the Galaxy
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: HUD Menu!
« Reply #5 on: July 26, 2017, 03:31:34 AM »
Do you need me to join your world and help? This is a very very basic framework of the actual menu, you would need further scripting knowledge and an understanding of the script to truly finish it.