Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Scripting Limit Question

Page: 1 of 1
 EnderWiggin
12-09-2004, 9:53 AM
#1
This is a scripting question thread. My First Question is, Is there a way to Have the same door take you to different modules? Like, Could I have a door that when opened, could say something like "Field" and then have the field have different npcs and quests and things by making Field1.mod, Field2.mod etc, and then have it Take Me to Field One the first time, Field 2 the next etc?

_EW_
 tk102
12-09-2004, 9:57 AM
#2
I can think of two ways you can do this...

You could make the door sort of like an elevator where the person could choose their destination (ala Dialog attached to the Conversation tag of the .utd whose different branches have scripts which call separate StartNewModule functions).

Or you could have the OnOpen script of the .utd fire a script which looks up the value of a Global Variable and decide from that which module to launch (user gets no choice).
 EnderWiggin
12-09-2004, 10:02 AM
#3
I would need the 2nd one. Thanks! The next question is, how do you get the location, (Whereami Values), For people behind a bar? And how would I do That 2nd option? (What script would I use and how do i do Globals?)

_EW_
 Darth333
12-09-2004, 10:04 AM
#4
Originally posted by tk102

You could make the door sort of like an elevator where the person could choose their destination (ala Dialog attached to the Conversation tag of the .utd whose different branches have scripts which call separate StartNewModule functions).

A talking door? Wouldn't that be a little weird? You could also plant a computer beside the door that would ask you where to go or why not a desk with a receptionnist?


You can have a look at the dlg in my warping armband mod: door, placeable, npc dialogue, it's all the same ;)
 tk102
12-09-2004, 10:09 AM
#5
For the XYZO values, take a look at the .git file for that module -- they should be in there for that .utc.

For the script it would something like this:

void main() {
int nGoWhere = GetGlobalNumber("your_globalvar");
switch (nGoWhere)
{
case 1:
StartNewModule("modulename1");
break;
case 2:
StartNewModule("modulename2");
break;
//etc...
}
}
 tk102
12-09-2004, 10:15 AM
#6
A talking door? Wouldn't that be a little weird? You could also plant a computer beside the door that would ask you where to go or why not a desk with a receptionnist?
Just set the ComputerType flag to 1 and make the conversation a computer interface.
 Doom_Dealer
12-09-2004, 10:29 AM
#7
Originally posted by Darth333
A talking door? Wouldn't that be a little weird? You could also plant a computer beside the door that would ask you where to go or why not a desk with a receptionnist?


You can have a look at the dlg in my warping armband mod: door, placeable, npc dialogue, it's all the same ;)


lol, good point, But ive used it before, if you just pretend its an elevator its quite effective :)
Page: 1 of 1