Aller au contenu

Photo

basic questions - displaying text


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
TD1415

TD1415
  • Members
  • 1 messages
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!

#2
Builder_Anthony

Builder_Anthony
  • Members
  • 450 messages
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.

#3
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
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
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 878 messages
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:

// 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
Hardcore UFO

Hardcore UFO
  • Members
  • 86 messages
For information on specific wording to use and how in scripting, nwnlexicon.com is very helpful.

#6
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
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.

#7
Vanturi

Vanturi
  • Members
  • 3 messages
Thanks Amethyst Dragon.  That's exactly what I was looking for too.  Awesome!