UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[Menu] Menu not notifying GSC of menuresponse

broken avatar :(
Created 10 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
3,671 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
*Note: This menu is being used in BO1 dont know if that changes anything
*Note: This is the exact same method and route i used to make my menu in NDU-Revamp and have always used to make buttons in menus and has always worked in WaW
*Note: player is the host (first player connected to the game)

Ive created a simple menu and added 4 buttons (3 buttons to change settings and 1 to close the menu and start the game since my menu is a pregame menu) using this function define for all my buttons, the menu opens and functions perfectly fine but when it comes to buttons they dont seem to notify GSC of menureponse

in my waittill(menureponse) loop ive tried makign sure the passed menu is mine and also tried just checking if its the right reponse

Any one know why i might be having this issue?

Button is using the following to try and notify GSC
Code Snippet
Plaintext
action
{
scriptmenuresponse "MY_RESPONSE";
}

My first initial try at waiting for a menu reponse
Code Snippet
Plaintext
for(;;)
{
player waittill("menureponse", menu, reponse);

if(menu == "MY_MENU")
{
IPrintLn("Found My Menu");

if(response == "MY_RESPONSE")
IPrintLN("Found My Response");
}

}

Ive also tried the following
Code Snippet
Plaintext
for(;;)
{
player waittill("menureponse", menu, reponse);

if(response == "MY_RESPONSE")
IPrintLN("Found My Response");
}

My code im using to open the menu
Code Snippet
Plaintext
player OpenMenu("MY_MENU");

My code im using to close the menu (if i need to close it from script)
Code Snippet
Plaintext
player CloseMenu();
player CloseInGameMenu();

Using all of these methods not once does my game print "Found My Menu" or "Found My Response"
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
What menu are you doing it from a scriptmenu?
Are you then applying it to the player and running it in the background?
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
What menu are you doing it from a scriptmenu?

Yes, my menu is located at ui\scriptmenus\MY_MENU.menu

Are you then applying it to the player and running it in the background?

atm all i have is a onPlayerConnect calling my menu think function (menureponse loop) on the host (first player to connect) the nhaving it wait for the player to spawn (for some reason calling it right away wouldnt work) then opening the menu then waiting for responses and loops

Spoiler: click to open...
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
level thread onPlayerConnect

remove your weird logic check for onPlayerConnect host can be checked by

player GetEntityNumber() == 0

Give it a try instead.


Edit: Your button macro the last line shouldn't contain a \ in order to define the macro length.
Last Edit: May 11, 2016, 12:56:09 am by DidUknowiPwn
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
level thread onPlayerConnect

remove your weird logic check for onPlayerConnect host can be checked by

player GetEntityNumber() == 0

Give it a try instead.
changed my logic to use this and i get the same result menu opens but buttons dont work (btw im checking console for prints since when in menu you cant see IPrintLn's, thought i should point this out)

anyways one thing i have found is when i press ESC it closes my menu and the scriptmenureponse in onClose is sent and my gsc prints "Found My Menu" so i might have fucked up with buttons

heres my menu might help and see if im doing something wrong
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
changed my logic to use this and i get the same result menu opens but buttons dont work (btw im checking console for prints since when in menu you cant see IPrintLn's, thought i should point this out)

anyways one thing i have found is when i press ESC it closes my menu and the scriptmenureponse in onClose is sent and my gsc prints "Found My Menu" so i might have fucked up with buttons

heres my menu might help and see if im doing something wrong

As I said your macro's final line shouldn't contain an \
Also move the macro inside the menudef it should be throwing an error saying it doesn't exist or something at least.

Edit: Here's a modified script http://paste.md-5.net/kuxayonota.coffee
Last Edit: May 11, 2016, 01:02:46 am by DidUknowiPwn
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
I've decied to use dvars instead of a menu since i cant for the life of me get buttons to work

If your wondering how the dvar will work
dvar is set before game and on host spawn the game gets the dvar and verifies that its a valid string and gamemode name, if its not valid it will default to the classic gamemode type

 
Loading ...