You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Help and Guidance  \  Using the 'Run' command

Back to Threads

Viewing Thread: Using the 'Run' command

 

Canuck

Joined: 31 August 2007
Posts: 419
07 January 2009 03:05 (UK time)

Can the 'run' command (like, 'run Function') only be used in sector script commands, or can it be used in a script file as well? Like this:


void Function#1()
{
SC_GameMessage("I wonder if this will work?");
run Function#2
}


You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
07 January 2009 10:39 (UK time)

In a script file, you can just call functions without the "run" thing, so why would you want to do that? It's a waste of like 4 byte (^^,)


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


You need to login to create posts in this thread.

Canuck

Joined: 31 August 2007
Posts: 419
07 January 2009 20:08 (UK time)

Well, I've got a great long section of script that's like 10 lines long and it has to run for more than one function, like this:


void Function1()
{
SC_SomethingOrOther(384,2);
SC_BlahBlahBlah(5,24);
SC_BlahBlahBlah(7,23);
SC_BlahBlahBlah(2,23);
SC_BlahBlahBlah(0,23);
SC_BlahBlahBlah(1,23);
SC_BlahBlahBlah(4,23);
SC_BlahBlahBlah(3,23);
}

void Function2()
{
SC_SomethingElse(574,3);
SC_BlahBlahBlah(5,24);
SC_BlahBlahBlah(7,23);
SC_BlahBlahBlah(2,23);
SC_BlahBlahBlah(0,23);
SC_BlahBlahBlah(1,23);
SC_BlahBlahBlah(4,23);
SC_BlahBlahBlah(3,23);
}


And there's a whole load of functions, not just two. What I want is something to do this:


void Function1()
{
SC_SomethingOrOther(384,2);
run Function3;
}

void Function2()
{
SC_SomethingElse(574,3);
run Function3;
}

void Function3()
{
SC_BlahBlahBlah(5,24);
SC_BlahBlahBlah(7,23);
SC_BlahBlahBlah(2,23);
SC_BlahBlahBlah(0,23);
SC_BlahBlahBlah(1,23);
SC_BlahBlahBlah(4,23);
SC_BlahBlahBlah(3,23);
}



You need to login to create posts in this thread.

Canuck

Joined: 31 August 2007
Posts: 419
07 January 2009 20:20 (UK time)

Oh, never mind, I found a solution--make a dat file for the mod. This will probably work better for me anyway.

You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
07 January 2009 20:21 (UK time)

Well, you still don't have to use the Run command for that, just call those functions and you should be fine.

Of course if you REALLY want to use Run, you can call the SC_PassToConsole() function...


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
07 January 2009 20:55 (UK time)


void Function1()
{
SC_SomethingOrOther(384,2);
Function2();
}

void Function2()
{
SC_SomethingElse(574,3);
Function3();
}

void Function3()
{
SC_BlahBlahBlah(5,24);
SC_BlahBlahBlah(7,23);
SC_BlahBlahBlah(2,23);
SC_BlahBlahBlah(0,23);
SC_BlahBlahBlah(1,23);
SC_BlahBlahBlah(4,23);
SC_BlahBlahBlah(3,23);
}


You need to login to create posts in this thread.

Canuck

Joined: 31 August 2007
Posts: 419
07 January 2009 22:25 (UK time)

Yeah, I forgot to put the brackets after the function name, that's why it wasn't working. Thanks, guys.

You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use