Jump to content

Home

Scripting Limit Question


EnderWiggin

Recommended Posts

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_

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

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...
}
}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...