PDA

View Full Version : what is the entrance?


Pikmin
08-07-2008, 08:18 AM
What is the on_entrance script for 650DAN? I need to modify it so that when 650DAN loads after a global is activated a certain dialog plays.

zbyl2
08-07-2008, 08:45 AM
You mean OnEnter? If yes, then 650DAN have no OnEnter script, I'm afraid.
Of cource you can add one by editing 650dan.are (or ifo? I don't sure about this).

Pikmin
08-07-2008, 11:08 AM
That is what I thought. I guess I'll have to make 651dan.

DarthStoney
08-07-2008, 12:37 PM
The script that fires on enter according to the .are file is a_650removeparty.ncs .

Pikmin
08-07-2008, 02:52 PM
Yeah, I'll just make an onenter script. Also what command does a script use to check if a global equals x or not?

zbyl2
08-07-2008, 03:02 PM
Also what command does a script use to check if a global equals x or not?
if(GetGlobalNumber("name_of_your_global")==x) //if yor global = x...
{
//do something
} else {
//do something esle... Or just remove else and it'll do nothing
}
That should work for you. Just change "x" to any number, and of course name_of_your_global to name of your global ;)

Pikmin
08-07-2008, 03:10 PM
Thanks!

So will the following work? If the global equals 1 it will load unconc.dlg, and if it equals anything else it will load unconc2.dlg? Right?


void main()
{


object oEntering = GetEnteringObject();


if (GetIsPC(oEntering))
{



if(GetGlobalNumber("000_PC_IsDead")==1)
{
ActionStartConversation(GetFirstPC(),"unconc.dlg");
} else {
ActionStartConversation(GetFirstPC(),"unconc2.dlg");
}


// Now we need to launch the original script

ExecuteScript("a_650removeparty", OBJECT_SELF);
}

Darth InSidious
08-07-2008, 04:16 PM
There is an even simpler way, which would be to rename the original OnEnter script (to, say, old_650rp.ncs), and then name your new script the same as the old OnEnter originally was (a_650removeparty.ncs). This means that the game will read your new script in the Override folder/module as the original, and then execute the script requested as it was asked to.

Pikmin
08-07-2008, 04:42 PM
There is an even simpler way, which would be to rename the original OnEnter script (to, say, old_650rp.ncs), and then name your new script the same as the old OnEnter originally was (a_650removeparty.ncs). This means that the game will read your new script in the Override folder/module as the original, and then execute the script requested as it was asked to.

That is basicly what i'm going to do.