Oblis Posted September 20, 2012 Share Posted September 20, 2012 Hello,I was thinking to create a Companion summon spell that will have NPC's name as buttons.I mean: When the player casts the spell a message box with buttons (even tabs) will appear.Each button will have the name of an available NPC companion (maybe of those the player has met until that momment).Or maybe the NPC that currently following the player? (I think this is better).Then when the player selects a choice, the npc will be summoned (and some more good things will happen)Can you help me start the script? Link to comment Share on other sites More sharing options...
WarRatsG Posted September 21, 2012 Share Posted September 21, 2012 (edited) A good tutorial for Messageboxes can be found here. As for names of NPCs, you will need to use something called a "format specifier". Most of the useful ones come with OBSE, including the one you will need. Generally, a format specifier is a marker that the script replaces with a variable, depending on the specifier. The one you will need is %n, which is replaced with the in-game name of the ref variable passed to it as an arguement. Some people say that when using these, you must use MessageboxEX instead of Messagebox, but others are saying MessageboxEX was deprecated a long time ago. I've never had any problems with either. For example, with MessageboxEX: Ref Follower1 Ref Follower2 Ref Follower3 Begin Set Follower1 to SnapREF Set Follower2 to CrackleREF Set Follower3 to PopREF MessageBoxEX "Which follower would you like to summon? |%n |%n |%n" Follower1 Follower2 Follower3 Would print: Which follower would you like to summon? |Snap| |Crackle| |Pop| Edited September 21, 2012 by WarRatsG Link to comment Share on other sites More sharing options...
Recommended Posts