adamchaggama Posted July 1, 2012 Share Posted July 1, 2012 i want to make one of them spells that open a menu but i cant figure out how to do it can eny one help me? Link to comment Share on other sites More sharing options...
adamchaggama Posted July 1, 2012 Author Share Posted July 1, 2012 in more detail i want to make a spell that when you use it a menu pops out with some options Link to comment Share on other sites More sharing options...
Xilante Posted July 2, 2012 Share Posted July 2, 2012 Just found This out, is it what you're looking for? Link to comment Share on other sites More sharing options...
adamchaggama Posted July 2, 2012 Author Share Posted July 2, 2012 thanks for trying to help but am not sure if thats it. i want to make a spell that when you use it a box pops up on your screen and you have options there am trying to make a castle mod and at the gatewhen i use the spell options pop up and lets sey one of them is when i press that option the guard opens the gate Link to comment Share on other sites More sharing options...
steve40 Posted July 2, 2012 Share Posted July 2, 2012 (edited) The page that Xilante gave you is the right thing. You will have to study the wiki example and adapt the code to work with a spell, and adapt the options presented to open/close the gate. You'll need the script to extend ActiveMagicEffect instead of ObjectReference.Instead of the OnRead() event, you will rename it to OnEffectStart().You should omit the OnContainerChanged() block completely. Maybe later if I have time I'll write the spell script for you. Edited July 2, 2012 by steve40 Link to comment Share on other sites More sharing options...
steve40 Posted July 3, 2012 Share Posted July 3, 2012 (edited) This is a template of how you would open a menu using a Spell with a script attached to a MagicEffect. You will need to modify this template to your needs and write your custom functions etc.   ScriptName _CustomMenuScript extends ActiveMagicEffect { A template for a MagicEffect script that opens a custom menu. } Message property _Menu1 auto ; You need to create at lease one Message form in the CK. This one is for the main menu Message property _Menu2 auto ; If you want to have a sub-menu, you will need to create a second Message form in the CK ;============================================================== Event OnEffectStart(Actor akTarget, Actor akCaster) If akCaster = game.GetPlayer() Menu() EndIf Dispel() ; Kill the spell and quit EndEvent ;============================================================== Function Menu() int option = _Menu1.show() ; Show the Main Menu If option == 0 ; This would be the "Open Drawbridge" option OpenDrawbridge() ; Calls a custom function to do something useful Menu() ; Return to the Main Menu ElseIf option == 1 ; This would be the "Close Drawbridge" option CloseDrawbridge() ; Calls another custom function to do something useful Menu() ; Return to the Main Menu ElseIf option == 2 ; This would be an option to open a sub-menu, if required ShowMenu2() ; This is how you would call a custom function to open a sub-menu Menu() ; Return to the Main Menu ElseIf option == 3 ; This would be the "Cancel menu" option Return EndIf EndFunction ;============================================================== Function OpenDrawbridge() ; do stuff here to open the drawbridge EndFunction ;============================================================== Function CloseDrawbridge() ; do stuff here to close the drawbridge EndFunction ;============================================================== ;\ remove this comment block if you want to use this part Function ShowMenu2() int option = _Menu2.show() ; Show the sub-menu If option == 0 myCustomFunction() ; do something useful ShowMenu2() ; Return to the sub-menu ElseIf option == 1 Return ; Return to the Main Menu EndIf EndFunction \; ;==============================================================   EDIT: I've re-written the code a little. Edited July 4, 2012 by steve40 Link to comment Share on other sites More sharing options...
adamchaggama Posted July 3, 2012 Author Share Posted July 3, 2012 thanks fo our help its realy complicated Link to comment Share on other sites More sharing options...
adamchaggama Posted July 3, 2012 Author Share Posted July 3, 2012 forr your Link to comment Share on other sites More sharing options...
adamchaggama Posted July 4, 2012 Author Share Posted July 4, 2012 erm could enyone make a video tutorial on this please Link to comment Share on other sites More sharing options...
Xilante Posted July 6, 2012 Share Posted July 6, 2012 Uhm, I can't promise anything but I Might make it.I'll let you know eventually. Link to comment Share on other sites More sharing options...
Recommended Posts