I am just starting out designing modules and have what I think is a pretty basic question. I would like to display a brief background message when the module is started, like in a text box. Can anyone help me with this?
I also don't know anything about scripting but have the sense that I need to learn at least a little. Does anyone know of a good online resource for this?
Thanks!
basic questions - displaying text
Débuté par
TD1415
, oct. 19 2011 02:15
#1
Posté 19 octobre 2011 - 02:15
#2
Posté 19 octobre 2011 - 05:51
Sure i assume you know how to copy and paste things.Download lilacs souls script generator.Just google what i typed there.Thats basicly a thing that creates script and you just copy paste your script when your done createing it.Its real easy but heres some help for starting you off.
In the mod your createing draw a generic trigger where you want the text to start displaying when a player walks over the trigger you drawn it will create your message.So draw the trigger a box by drawing the 3 sides of the box then double click your mouse and it will close the box.Then click on your generic trigger youve just drawn and find the scripts tab.Since u want the script to work when a player enters it you will put your script in the on enter tab.It will just be the script name you save it as.So lets create the script.Open the generator and hit create normal script then on enter then click create floating text and type in what you want it to say.copy your script........go to the toolset and go to that trigger you made and enter a name for the script you just made........name it something and when it sayss no script exsists by that name it will take you automaticly to the script creator page.paste your script there and save it.Thats it.its kind of a fast rundown of things but that should be the basics of things im sure you will get the hang of the script generator very fast.
In the mod your createing draw a generic trigger where you want the text to start displaying when a player walks over the trigger you drawn it will create your message.So draw the trigger a box by drawing the 3 sides of the box then double click your mouse and it will close the box.Then click on your generic trigger youve just drawn and find the scripts tab.Since u want the script to work when a player enters it you will put your script in the on enter tab.It will just be the script name you save it as.So lets create the script.Open the generator and hit create normal script then on enter then click create floating text and type in what you want it to say.copy your script........go to the toolset and go to that trigger you made and enter a name for the script you just made........name it something and when it sayss no script exsists by that name it will take you automaticly to the script creator page.paste your script there and save it.Thats it.its kind of a fast rundown of things but that should be the basics of things im sure you will get the hang of the script generator very fast.
#3
Posté 19 octobre 2011 - 11:08
You may also want to check out my scripting tutorial linked below. Written with NWN2 in mind but the script language is the same, 95% + of the stuff in there applies to NWN1 as well. Also, it contains a link in it to download LS Script Generator.
#4
Posté 19 octobre 2011 - 02:02
Try this simple trick:
Place an invisible object near your start point. Give it a unique tag (for example, ""startingtext") and change it's name (this can be a single blank space if you like) and description to what you want visible in the text box ("In a world...").
Place a trigger near your start point that the PC will have to walk through within a few steps of starting. In the "on enter" event, add this script:
Have fun.
Place an invisible object near your start point. Give it a unique tag (for example, ""startingtext") and change it's name (this can be a single blank space if you like) and description to what you want visible in the text box ("In a world...").
Place a trigger near your start point that the PC will have to walk through within a few steps of starting. In the "on enter" event, add this script:
// Quick descriptive text box
// activated from a trigger
void main()
{
object oPC = GetEnteringObject();
object oText = GetNearestObjectByTag("startingtext");
AssignCommand(oPC, ClearAllActions());
DelayCommand(0.1, AssignCommand(oPC, ActionExamine(oText)));
}
Have fun.
#5
Posté 19 octobre 2011 - 02:12
For information on specific wording to use and how in scripting, nwnlexicon.com is very helpful.
#6
Posté 01 novembre 2011 - 12:02
I like this The Amethyst Dragon.Very clean and simple way for text.
I have a mod I work on TD1415 and I dont know how to script.I am a cut-n-paste warrior.So between this awesome community and the plentiful other resources I have put together my own project.
I have a mod I work on TD1415 and I dont know how to script.I am a cut-n-paste warrior.So between this awesome community and the plentiful other resources I have put together my own project.
#7
Posté 06 janvier 2012 - 02:03
Thanks Amethyst Dragon. That's exactly what I was looking for too. Awesome!





Retour en haut






