Jump to content


buzzbomb

Member Since 01 Jun 2008
Offline Last Active Jan 03 2013 11:46 PM

Posts I've Made

In Topic: Drop down menu w/ scrollbar

11 July 2010 - 04:32 PM

I know there has to be someone out there who can help me here! All I need is a way  to assign a variable when someone presses an option on the drop down menu. The code I'm using is the same one I linked to in the first post. I have everything figured out, but when I select an option from the menu, it changes the selected weapon like it should but there isn't a way to assign a global variable to that.

So I ask, how? How would I assign a variable to it? My first idea was something along the lines of
if ID2 = "Weapon 2" 
{global.p2 = 2}

But obviously that didn't work. So how exactly should I go about changing this so it does? Is it even possible?

In Topic: Drop down menu w/ scrollbar

08 July 2010 - 11:25 PM

draw event .. line 46 will get the selection number when you press it .. just add some code right after it, or store it as you want.


I'm afraid I don't quite understand....

I tried to make it display a message if weapon 2 was selected, so I changed the creation code in the control event to this, to see if the player even had the option to select weapon 2.

ID2 = ddm_create_menu(200,650,"Choose a weapon",10,false,false,fnt_menu);

if global.p211 > 0 {ddm_add_option (ID2,"weapon 1")};
if global.p212 > 0 {ddm_add_option (ID2,"weapon 2")};
ddm_add_option(ID2,"weapon 3");
ddm_add_option(ID2,"weapon 4");
ddm_add_option(ID2,"weapon 5");
It works fine, if the player has access to weapon 1 or 2, then they display on the menu respectively, while weapons 3-5 are always there, and it all functions properly.

The only issue is when I select the option, while it does display "weapon 2" (like the draw event of obj_control tells it to) I can't figure out a way to assign a varible onto that. I looked at line 46 in the draw event of obj_dropdown_menu like you said, but I don't see how adding any kind of code to that could help it differentiate between selections.

here is the code on line 46:
menuOption = ds_list_find_value(list,scrollPosition+i-1);
I must be doing something wrong here... could you help out just a bit more?

Again, all I need it to do is display a message so I know it registered the weapon selection properly. I can change it to setting a variable for the weapon itself and all of that later. I just need to find a way to display a simple message.

Thank you for your time, I imagine it's annoying dealing with n00bs like me on these boards.

In Topic: Identifying non-origin point

07 July 2010 - 12:21 AM

Absolutely flawless, thank you, both of you!  :D

In Topic: Gamemaker Online Highscores

21 August 2009 - 05:32 PM

Quick question; Is there any way to chage the name of / delete a single highscore? If someone posts somthing profane as there name on the score table, I'd like to be able to delete it without having to clear the entire highscore table...

If there isn't a way currently, do you know when there will be one?

In Topic: Gamemaker Online Highscores

13 July 2009 - 10:00 PM

Fantasic, simply fantasic. This is by far one of the best online highscore engines I've seen.

But one problem, in the example on the site and in the game I tried to add this to, when I try to upload the highscore, the game freezes completly. Is this just my computer or a known bug?