RoboBob3000 wrote:
While I'm quoting the docs:There are four general classes of script commands, as follows:
1. Placement
2. Condition
3. Interaction
4. Queries
5. Decision making
Our THREE main weapons are fear, surprise, and ...!
I can help elaborate on how Default Scripts work, and how the Global Script command works differently.
A Default Script can be defined and work independent of any Global Script commands. A Global Script requires a Default Script to work off of. Let me explain with some examples.
If you want to make something the functions the same everywhere, like a Roach2, or likely a Weighted Cube, then a Default Script is probably the best option. To make these, all you need to do is: (1) create a new custom character type, (2) define its Default Script, then (3) place them around wherever you like. No more need to copy-and-paste the same script into each instance of this element! That's basically it.
A Global Script is different -- it's used if you want to do one single thing across several rooms. Examples of this are "
whenever you rotate clockwise, you get a greckle"
or "
Press the special command key to fire the ray gun"
or "
Play the currently selected tunelist from your juke box"
. You probably wouldn't want several instances of this logic to run in a room at once -- just one. You probably also want it to run in each room. Defining a global script to do this lets this logic persist from room to room without having to make a copy of an NPC to execute this logic in each and every room.
To make a global script, you do: (1) make a custom character type, (2) define its Default Script, then (3) place an NPC in the first room of your hold (or wherever is appropriate), telling it to run a Global Script of that character type you just defined. Now its default script will run in each and every room from that moment on, unless you have the script End itself at some point for whatever reason.
I'll make a separate post to brainstorm some ideas for how this could work for you.
____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
[Last edited by mrimer at 04-07-2012 06:26 PM]