Suggestion: Global Scripts.

Started by Jimi, Tue 29/04/2003 19:24:24

Previous topic - Next topic

Jimi

I had an idea of Global Scripts. They could be used in exactly the same way as Global Messages, only they are scripts. In the room script, you could type something like...

RunGlobalScript(4);

...and it would run global script 4 that could be edited in the Global Scripts Menu.

I think this could be useful, because if you had a number of thing that have the same script, for example...

int ran=Random(2);
if (ran==0) {
  DisplaySpeech(GUYBRUSH,"mmm...no!");
  }
else if (ran==1) {
  DisplaySpeech(GUYBRUSH,"My pirate instincts tell me I should keep this to myself");
  }
else DisplaySpeech(GUYBRUSH,"I don't think that's wise");
  }


...that was just an example, but you could use Global Scripts for all sorts of things! I think everyone would benifit from this.

What do you think?  :)

Barcik


We have them. They are called custom functions.
Currently Working On: Monkey Island 1.5

Pumaman

It's perhaps not the most well documented part of AGS, but look up "Calling global functions from local scripts" in the manual.

Jimi


SMF spam blocked by CleanTalk