damian666 Posted March 20, 2009 Author Share Posted March 20, 2009 hi guys, this is my first time ever using sadscript, so please bear with me ok ^^i have a scripted tile, and it opens up a custom menu, with 2 picture buttons.1, choose, 2, closeso, how the hell am i supposed to script actions on those buttons?all it does now is stating with picture was clicked in what menu.i tried changing that line, in the close cmd, but then it closes on all pictures, and not only on the close button… XDany help would be welcome ^^thanx in advanceDamian666 Link to comment Share on other sites More sharing options...
Squiddle Posted March 20, 2009 Share Posted March 20, 2009 Ok, so you have your scripted tile which opens up a menu, right? It SHOULD look SOMETHING like this, not exactly though ;).```Case 0 Call CustomMenuShow(Index, "Background 1", "\GUI\CUSTOM\Background.bmp", 1) Call CustomMenuPicture(Index, 1, "\GUI\CUSTOM\Choose.bmp", 35, 176) Call CustomMenuPicture(Index, 2, "\GUI\CUSTOM\Close.bmp", 363, 176)```Notice the "1" and the "2" in the CustomMenuPicture, those are very important as they identify what the picture IS, so Chooses is number 1, Close is number 2.Next, you should have THIS under your Sub MenuScripts:```Case 1 If Clicked_Index = 1 Then *Whatever happens when Choose is picked*) End If If Clicked_Index = 2 Then Call CustomMenuClose(Index) End If ```And that's how you add scripted buttons =). Link to comment Share on other sites More sharing options...
damian666 Posted March 20, 2009 Author Share Posted March 20, 2009 whoa, that simple hee O.owhy the hell did i not think of that ^^one more then, just hypothetical, if i create more custom menu'sthe index number of the image goes up?proberly yes huh?because if i make more then one menu, icany be index 1, because that is used in another menu right?or is there a way to further the difference, like with the cuctom menu name?thanx alot anyway, you made it very clear for me, and my god, it WORKS :pDamian666 Link to comment Share on other sites More sharing options...
Squiddle Posted March 21, 2009 Share Posted March 21, 2009 Yes, you're right. There might be a way to divide it with the name of the custom menu, but I've never done somethign like that. I just give each button a new index number. Link to comment Share on other sites More sharing options...
balliztik1 Posted March 21, 2009 Share Posted March 21, 2009 Actually, Squiddle, you'll want to sort like that anyway, or any time you click picture 1 or 2, no matter the menu, you'll get those effects.I think this is the code:```Case 1 Select Case Menu_Title Case "Background 1" If Clicked_Index = 1 Then *Whatever happens when Choose is picked*) End If If Clicked_Index = 2 Then Call CustomMenuClose(Index) End If End Select``` Link to comment Share on other sites More sharing options...
damian666 Posted March 21, 2009 Author Share Posted March 21, 2009 aha, well, thats clear too :)thanx guys, you helped me a lot ^^Damian666 Link to comment Share on other sites More sharing options...
Squiddle Posted March 21, 2009 Share Posted March 21, 2009 Ooooh, that also helps me Ballie ;). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now