Layonara
Tiger Direct Specials
Advertise on Layonara
Layonara (nwn/sou/hotu-1.69)
Version 3.02.3
Threads: 33,386 • Posts: 233,476 • Gallery Images: 9,875 • Members: 8,177 • Online: 35 (Guests: 24)
Home Forums Gallery Classifieds Stores Donate
Go Back Layonara > The Layonara Community > General Discussion
Layonara Fantasy Wear Shop Amazon
Calendar Search Today's Posts New Players Layonara Links Mark Forums Read Register

General Discussion If you have anything off topic to say or you are unsure where to post, this is the place to do so.


Welcome to the Layonara forums!

Layonara is so much more than a game. We started off as a tabletop Dungeons and Dragons campaign more than a decade ago. Since then we have developed into a fantasy world with as much compelling and engrossing detail as you will find anywhere.

Our current showcase is a Neverwinter Nights version of Layonara, where our world comes to life in a finely polished persistent world which you can play free of charge. These forums are set up to support and accentuate our player's experiences, but it goes far beyond that.

After years of passionate effort, our world is so well developed, so detailed, so refined that any of the handbooks, maps, historical accounts, legends, descriptions of artifacts, creature reports, character biographies, short stories, novels, movies and original art which populate these forums can surely serve as resources or inspiration for your own fantasy endeavors, whatever they may be. And our world is endlessly evolving, so resources are frequently added and updated.

There are also years of sage advice and commentary on role-playing, gaming and online community development stored in these forums. If camaraderie is what you seek, we offer that too. Our community is as active and supportive as you're likely to find on the internet. In short, these forums are a resource for you to use for whatever purpose or project brought you here.

We're confident that you will find what you are looking for, and likely, substantially more.

Please be our guest and browse around the forums which are available to you. As you do, keep in mind that you are sampling only a portion of what Layonara has to offer. Membership in our community is free, and allows you to establish a Layonara identity to pose your questions and share your thoughts on the forums. When you join you'll also be able to communicate privately to other members (PMs), establish and respond to polls, upload and download content and access many other special features. Registration is fast, simple and absolutely free. So please. join our community today!
Reply
 
Thread Tools Display Modes
Old 12-30-05, 07:09 PM #1
Dominæter
Goblin Welp

Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Toolset Scripting *looks angry and confused*

Well i have been starting some toolset scripting but i just cant figure it out. I know some basic C++ which has proven invaluable but i can figure out how to make it work. If there is anyone here who might know how to do this please help me. Since the people at Layo seemed to do such i fine job i was hoping for some help. I checked other sites and their search is HORRIBLE. Well here is the problem.

I cant figure out how to use Module variables. I dont even know what they are. Are they like a variable every PC gets when he joins the server? That was what i assumed. So i set a module int with name "Status" to 10. Then i made a trigger. on the "OnEnter" this is the code i put in.

void main()
{
object oPC = GetEnteringObject();
string sBla = IntToString(GetLocalInt(oPC,"Status"));
AssignCommand(oPC,SpeakString(sBla));
}
Why does my person say ""
That makes no sense! Its returning nothing. Shouldnt it be returning "hello"? Im near the end of my tolerance, please someone out there help me
Hopelessly Stressed
Dom
Dominæter is offline Reply With Quote
Old 12-30-05, 08:04 PM #2
Dorganath
Administrator
Characters

Join Date: Oct 2004
Location: Chicago-ish
Posts: 8,759
Thanks: 69
Thanked 1,999 Times in 948 Posts
Default RE: Toolset Scripting *looks angry and confused*

Based on your description and your code...
You set a module int to 10, but then tried to read that int off the PC, not the module. So when it reads from the PC, that variable doesn't exist. Any variables you set on the module reside on the module object. You'd have to set a variable on the PC explicitly for it to have one to read.Â
To get your code to work, you need something like:
object oPC = GetEnteringObject(); object oMod = GetModule(); string sBla = IntToString(oMod, "Status" ); AssignCommand(oPC, ActionSpeakString(sBla));
Oh and try this site: http://www.nwnlexicon.com/
Good luck!
Dorganath is offline Reply With Quote
Old 12-31-05, 10:49 AM #3
Dominæter
Goblin Welp

Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default RE: Toolset Scripting *looks angry and confused*

thanks a bunch, i have that site bookmarked already , it doesnt give many examples though. i was thinking about GetModule(), say a person talks to a NPC and gets an item ONLY once, and i set a module int to 1 or 2. 1 meaning he gets one 2 meaning he already has one. if one person walked up and i used GetLocalInt(GetModule(),"bla");
wouldnt the next person that tries to get the item not get it?
And can i make new variables in code? Like when a PC joins the server, make a copy of all the module variables and assign them to him?
Would i use OnClientEnter?

and then

void main()
{
object oPC = GetEnteringObject();
object oModule = GetModule();

SetLocalInt(oPC,"ModInt1",GetLocalInt(oModule,"Mod Int1"));
SetLocalInt(oPC,"ModInt2",GetLocalInt(oModule,"Mod Int2"));
SetLocalString(oPC,"ModString1",GetLocalString(oMo dule,"ModString1"));
SetLocalString(oPC,"ModString2",GetLocalString(oMo dule,"ModString2"));
SetLocalFloat(oPC,"ModFloat1",GetLocalFloat(oModul e,"ModFloat1"));
SetLocalFloat(oPC,"ModFloat2",GetLocalFloat(oModul e,"ModFloat2"));
}

wouldn that create new local variables on the pc i can use? Thanks for your help Dorganath i really appreciate it
oh and is there any way i can make the code wait besides ActionWait, and DelayCommand?
Dom
Dominæter is offline Reply With Quote

Old 12-31-05, 05:01 PM #4
Dominæter
Goblin Welp

Join Date: Nov 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default RE: Toolset Scripting *looks angry and confused*

forget that one above, i figured it out. It works. So now i have another little problem. New death script. I want my dude to just respawn. Why do i have to use SignalEvent? Why not just and effect like EffectResurrection? or EffectREsurrect (cant remember which one.) thats really odd.
Dom
Dominæter is offline Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 08:45 AM.


© 2007 Layonara Studios, LLC All rights reserved. Layonara is a registered trademark and copyright of Daniel R. Scott.
Privacy Policy - Terms and Conditions Of Use

Search Engine Friendly URLs by vBSEO 3.0.0