Some Sort Of "constant" Condition

Post » Fri May 27, 2011 2:17 pm

I have the technical vocabulary of 2 year old, so bear with me.
I have message boxes. Quite a few message boxes, actually.
Is there a way to remove a box after a condition is reached.
Or to have a different action performed when clicking a button when "X" condition is reached.

Normally, I would do this in message boxes.
But I have SO MANY boxes I doubt I could succeed while keeping my sanity.
User avatar
dell
 
Posts: 3452
Joined: Sat Mar 24, 2007 2:58 am

Post » Fri May 27, 2011 10:57 am

I can bear with you, or even beer with you, but I find it hard (not to mention inappropriate) to bare with you. Nor actually understand what exactly are you trying to ask. Perhaps if you understood it better first, it would be easier to explain to other people as well.
User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am

Post » Fri May 27, 2011 6:56 am

Allow me to try again.

I wish to make a series of Messageboxes.
My best attempt at this was to make each button set a state.
If it's equal to a certain state, a new set of buttons appears.

This is all fun and dandy until I try to make these buttons do something.
I'd like to disable the buttons after their lowliest of functions has been used.
I could do this in Messageboxes. Technically. But it would be long and sad (not to mention over the character limit).

Is there a smarter way of scripting this?
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Fri May 27, 2011 5:46 am

You could look at any mod that tries MessageBoxes with buttons to see how this works. http://www.tesnexus.com/downloads/file.php?id=270 is a classic example of two-level messagebox system, for example. As for disabling worked out buttons, bad news. There's no way to make buttons "disabled" other than programming a separate MessageBox operator for each enabled/disabled state... which is 2n for n=amount of buttons. That is, if you have just 8 buttons, you'd have to repeat the MessageBox 64 times. AFAIK, even MWSE has no way to make MessageBox "smarter". The only workable way to block functions is to display the MessageBox with all buttons enabled, and then check with a local variable whether the selected function was called earlier, and in such case throw a message like "You already did that, try something else" and repeat everything once again.

Then again, you may think of alternatives not including MessageBoxes at all. For example, one of scripts in my http://www.angelfire.com/rpg2/mad_weather/codelock.htm resource mod doesn't use menus at all but works through "pressing buttons" instead. Or if you don't like buttons, could be levitating magic crystals to click in the game mode. You get the idea.


And as for your PM - it's not a matter of pain. What you posted for a first time was really, really illegible and delivered no information about what you're trying to achieve.

But yes, learning by doing is the best way. Good luck.
User avatar
A Boy called Marilyn
 
Posts: 3391
Joined: Sat May 26, 2007 7:17 am

Post » Fri May 27, 2011 12:14 pm

How unfortunate. Meh, I'm persistent. I'll get through this.
Local variables it is.

Thanks for the help!

EDIT: Local variable for every sub-menu, right?
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm


Return to III - Morrowind