Apprendre la base des scripts quand on ne sait pas programmer

Copie d’une archive d’un site depuis disparu (audiopropaganda).


I started writing this after people started asking fundemental scripting questions that couldn’t really be written off with my two favorite answers: Go through AMTUT or Read The Fine Manual. WorldEd Manual, that is.

In some ways not having a background in programming isn’t all that bad. There are only a relatively small number of statements to learn and most have pretty specific uses. It’s a very abstracted language. Plus you’re not already used to things such as functions, variable names instead of variables number and of course comments.

On the other hand you’re stuck with me as teacher.

In case the name of this file or the post you read that led you here wasn’t your first clue, let me repeat: THIS IS ONLY A ROUGH DRAFT. IT IS NOT COMPLETE. THIS IS ALL YOU WILL GET FOR A WHILE. I really need to get cracking on my mod.

If anyone else out there want to contribute to this, feel free to email me and I will update this document.

If you have an particular topics you want covered, email those to me as well.

If you want help with a specific script, post it to the forum.

If you want me to do all the scripting for your module, send me 10-20 fully realized dialogs and .dat file with at least one Tarant sized town, a dungeon or two and maybe a village. Then we’ll talk. Seriously.

One last thing. When learning programming, you cannot be afraid to try things. If you see a statement that you don’t understand, try it in a script. See what happens. Experimentation is a great way to learn what things do. The worst that can happen is you’ll crash Arcanum. If that happens, adjust your script.

Obligatory Thanks

Troika. Troika. Troika. What else can I say that hasn’t already been said? Thanks for everything.

Without the following people I would said « fuck it » to Arcanum mod making and probably just waited for Neverwinter Nights: DarkUnderlord, Zammy, and DJ_Unique. Everyone on the Sierra boards has also been a big help, especially HexRei, MadTexan, and Rasputin the MM. The rest of you slackers and potheads are OK, too. Except for Mr. New View; please see me after class.

How To Use This Document

Read it! Follow the instructions. Take breaks, don’t overwhelm yourself. If you get stuck, stop for a bit. Do some work in WorldEd. Write some dialogs.

When you feel your eyes glazing over, that might be a good time to stop for a bit.
You may need to go through this document a few times. That’s a Good Thing. As you go through it more and more, things should become more and more familiar. Then you can start spotting my mistakes!

What Do I Assume?

That you’ve at least tried to do some editing in WorldEd. You should have followed AMTUT at least once. You should be able to create a working mod where you start and and talk to someone. Nothing complicated. Just that you know the basics of modding. After reading this hopefully you will be able to do something more complicated thanks to the magic world of Scripting.

I also assume that you have a working module. This way I can say things like: open your module and put a critter down, etc., etc., etc. If you’re feeling brave go ahead and try these examples on your existing maps. Or go ahead and create a new map in your mod called « Scripting Tutorial ». Whenever I need you to try stuff, use this map. Just set your startpoint there temporarily.

In this document, when we finally get to making scripts, I will say things like: « Save this script to you scr directory. » Where is your src directory? It depends. If you are using 1074 it will be here:

%Temp%\WorldEd Working Folder\Modules\[ModuleName]\scr

If you are using 1070 (or 1074 and following a tip I posted to the Sierra forum) it is here:


I’m only going over this part once, so pay attention: If you are using WorldEd 1074, you will need to open your module when working on scripts. Any changes you make while your module is closed will be lost. As mentioned above, I have posted a tip on the Sierra Forums to get around this, but you should only try it if you are comfortable with WorldEd.

Hopefully, you are already working with WorldEd so should know these things anyway. 🙂

What Do You Do First?

AMTUT. If you don’t, I have no sympathy for any problems you may encounter. If AMTUT is too hard to follow, try it again. If you really cant’t get it, you can do one of three things: 1) Give up or 2) Team up 3) Try Again. I recommend option #3. #2 isn’t so bad, but you’ll either have to organize a team or find someone that needs your particular skill set. Better start focusing on something. Most modders will want to team up with people with more than a story idea. We’ve *all* got story ideas.

Knowledge of WorldEd is critical to good scripting. If you don’t know the difference between containers, scenery, items and critters as far as WorldEd is concerned, you’ll find scripting a lot harder. If you manage to figure out scripting without having a good grasp of WorldEd, congradulations. You’re a better Critter than me.

The second thing you are required to do is download a copy of the WorldEd Manual. You can get the original Word document or PDF version of it on my site. And probably other places as well.

I know you don’t have the time or inclination to read the Manual and I don’t blame you. Eventually you should read it, but for now no need to. Just keep around a copy of it, because I will refer you to the manual instead of duplicating information.

While you are there, grab a copy of ScriptEd. You should use this to work on your scripts. Yes, Troika made the whole game with SockMonkey but that just means they are either all crazy or a hell of a lot better at planning scripts ahead than most people I know. You are more than welcome to use SockMonkey or even that other scripting program out there, but keep in mind, this document will be referring to ScriptEd.

ScriptEd is wonderful program. It has lots of useful feature that I will not be covering here. If you are not already using them, you are encouraged to play around with ScriptEd once you are more familiar with scripting.

What Is A Script?

A script is a series of statements generally used to change otherwise manipulate the world of you mod. Some scripts are used simply to track information and then other scripts will make decisions based on that information. A classic RPG example is the clearing out the rats in the cellar. One script is called whenever a rat dies, keeping track of the total rat deaths so far. When talking to the cellar owner, a second script can check the total against a pre-defined number.

A very import thing for people new to programming to understand about programming is COMPUTERS ARE STUPID. In our case « computer » will refer to the Arcanum Engine. Your script is a series of instructions to the engine. The computer will blindly follow the instructions, even if it means crashing the game. You’ll need to start thinking like a mindless automaton when reviewing your scripts.

Let’s pretend that we want to write a script for making a peanut butter and jelly sandwich:

0. Get two slices of bread.
1. Put Jelly on slice #1
2. Put peanut butter slice #2.
3. Attach slice #1 to slice #2.

Looks OK, right? WRONG! Maybe in my Sandwich Programming Language, you need to specify which side of the bread you mean when placing jelly or attaching it to another slice of bread. In this example you may have wound up with jelly or peanut butter or both on the outside. Let’s try again:

0. Get two slice of bread.
1. Put jelly on side A of slice #1
2. Put peanut butter on side A of slice #2
3. Attach side A of slice #1 to side A of slice #2

Ah, much better.

Keep this is mind when tracking down bugs in your scripts, and you will be tracking down plenty of bugs. No avoiding it. The more complex the script, the more chance of introducing a bug. When that happens, remember this: THE COMPUTER IS STUPID. Try to forget what you want your script to do. Read through each statement as if you were the stupid computer.

We’re probably getting ahead ourselves here . . .


That’s right sunshine, you’ve got homework! Your first assignment is to read the list of Action and Conditional statements in the WorldEd Manual. Ideally you should the list in the table of contents, and then skip down to page 74 and read them again with their descriptions. At the very least read the table of contents. Twice.
Don’t worry if the descriptions are a bit . . . confusing. We’re not teaching you to swim yet, we’re just hosing you down to wash away the stink. No wait, we’re hosing you down to get you used to the water. Read the statements and descriptions and try to think about how they might be used. Some are obvious: end game and play slides other may make your head spin the first time you read them: have (obj) use (obj) on (obj) using skill (num) with modifier (num). But don’t worry about. Just read.


OK, I can’t really check your homework, I’m going to have to trust you on this.
So, you’ve read the list of statements and probably noticed alot of (num) and (obj) in there. What are (num) and (obj)? The simple answer is they are the two data types in Arcanum Script. Of course the Simple Answer requires you to know what a data type is. If you don’t know, then let’s talk about madlibs today.

What? Madlibs? I came here to learn about scripting!

Sorry, I’m not a certified teacher so you have to suffer. Madlibs worked something like this. You get a bunch of people together. You want at least two people in your bunch. If you only have one person in your bunch (yourself), go here and give it a whirl : . Get it? Go ahead and skip the next part.

Got your bunch? Good. Someone is the bunch is designated the Reader. The Reader has a pieces of paper that says something like this:

I ____(past tense verb)____ my _____(adjective)_____ _____(noun)_______ in the head with a _______(noun)_____ today.

The Reader than asks various members of the bunch to supply words for the the blank spaces. In turn or all at once, the bunch member supply words such as « screwed » « knocked up » « killed » or « ate » for the (past tense verb) and « big » « hairy » « bulbous » « red » for adjective and « balls » « Mother » « dog » « computer » « dildo » or « pair of pants » for the noun. Once all the blanks are sufficiently filled in, the Reader now reads aloud sentance. It’s not the point that you couldn’t really kill your bulbous pair of pants in the head with a dildo. The point is to make such silly sentances.

As long as all the nouns are filled in with nouns and verbs with verbs, etc., etc., you will wind with at least a « well formed » sentance. Well formed meaning that it follows basic rules of grammar. Most likely the sentance will be « invalid » meaning that it makes no sense Assume a « valid » English sentance is one where meaningful information of some kind is conveyed. With madlibs, well formed but invalid sentances are OK, since you just want them to be funny and really aren’t try to learn anything. Although you do learn a little something about your friends that always suggest words like « screwing » « throbbing » « hairy » « bulbous » and « rod ».

With me so far?

If we pretend that madlibs is a programming language, you’re already a programmer! Actually, if madlibs is a programming language think of (nouns) and (adjectives) as the data types. Each represents the acceptable type of word to be placed in the blank. When asked for a (noun) you wouldn’t say something « greasy ». Doing so causes the sentances to not be well formed. You can’t Blank your Blank in the head with a « greasy ». Playing madlibs that way results in non well formed sentance with incorrect syntax. A syntactical mistake or sytax error if you will.

Data Types

In the Madlibs Scripting Lanugage, (noun) and (verb) and (adjective) and (adverb) are all data types. In Arcanum Script, (num) and (obj) are like the (noun) and (verb) in madlibs. They are the data types. When looking at the list of statements in Arcanum Script, think of (num) and (obj) as placeholders used to describe the statement. When you use the statement, you are filling in the blanks. Like in madlibs, you want to make sure that your syntax is correct so your statements are well formed. An example of poor syntax in Arcanum Script could be: drain 10 charges from Global Flag 4.

Unlike madlibs, Arcanum Script not only required well formed statements but valid ones as well. Invalid statements in Arcanum Script aren’t funny. They are called « bugs » and can be damned frustrating. An invalid statement in Arcanum might be add Blessing 12 to Player where you intended to add Blessing 512.

(obj) and (num) are the Arcanum Script data types. So, everyone should know that « car » and « pen » are valid words for the data type (noun). What are the valid values for (obj) and (num)? The short answer: OBJ and NUM variables.

OBJ variables.

OBJ is short for Object. Nice and generic. It refers to almost any thing in Arcanum. People, items, monsters, containers, etc., etc.

(obj) is always a thing or a collection of things. There is a pre-defined list of (obj)s in the scripting language. Go take a look at that now. Arcanum WorldEd Manual, page 71. All statements in Arcanum Script use one of those OBJ variables to replace the (obj) in statements. After reading the list, you should have an idea of what some of them do. Player. Any Follower. Everyone in Vicinity. Those make sense, right?
But you might be asking what the hell is an Extra Objects, Triggerers, Attachees and Current Looped Objects. Good for you. Here at Arcanum Scripting College we like people who ask questions. But don’t worry about them for now. We’ll explain more in Triggerer and Attachee are covered in Attachment Points and Current Looped Object in Loops.

Any? Every? Everyone? Anyone? Bueller?

Some of the (obj) variables are referred to as ANY or EVERY and sometimes both. So, what’s the difference? Simple. They mean the same thing in Arcanum Script as they do in English. Every Item means *every* item. Any Portal means any old portal will do. We’ll come back to Any vs. Every in Loops and Conditionals.

NUM Variables

(num) is at first glance a little easier. (num) is obviously for a number. Like 4 or 3028. And essentially that is correct. But NUM variables are also more. Much more.

Arcanum Script references everything with a number. What gender is the PC? 0 or 1? What is the unique name of an NPC? 8020. What is the social class of an NPC? 3 (technologist). Art, scripts, attachment points, critters, items, everything, anything. Numbers, numbers, numbers. This is the less obvious use of NUM variables. If your module has an important item, you will refer to it in script by its number. I say less obvious because at first you’d think you’d refer to it as an (obj). Not really. You’ll need to know it’s number

Often you will want to keep track of a number in your mod. This is called a Variable or Counter in Arcanum Script. Like how many rats have been killed. Or the number times the PC has tried to pickpocket someone. Variables are well, variable. They are placeholders values. Generally you are adding, subtracting or querying Variables.

If you’ve ever taken any algebra, you’ll have seen variables:

x + 2 = 9

« x » is variable in that equation. I won’t keep you hanging. X is equal to seven here.

There is also another type of NUM variable know as a Flag.


On/Off. Yes/No. Black/White. One/Zero. True/False. This is the realm of flags. Flags are either True or False. Flags are also lazy. If you haven’t told a Flag what it is, it will tell anyone that asks that it is False.

Scope: Not The Mouthwash.

When dealing with variables, their « scope » is very important. The scope of a variable determines where a variable can be seen.

Think of scope like a rifle scope. Or a pair of really nice binoculars. You can zoom in pretty far and see things up close and in detail. You can also zoom out and see more in general. In Arcanum Scripting there are two levels of scope. Local and Global. Locals is like zooming in all the way. Local things (variables and counters and flags) only apply to the script they are a part of. You can have five scripts that all have a different value for a local variable.

Global refers to the entirety of your module. All scripts and dialogs in your module can see the values of Global. When a Global flag becomes True, all scripts and dialogs will think that it is True.

There is another scope level in Arcanum called « Player » scope. Player scope is like Global scope, in the sense that the values of Player variables are visible to any and all scripts. The difference is that in a Multiplayer mod you could have several different players, all with their own Player variables. If you’re like me, and I know I am, you are making a Single Player module. For me Player variables are just another set of Globals I could use if I ever ran out of them. If you are doing a Multiplayer module, you will of course want to only use them for « global » things that apply only to a specific Player.


OK, hopefully you’re not too overwhelmed yet. I know you’re probably itching to start slamming out some scripts, but we really needed to lay down the ground work. This is an attempt to make up for the background in programming that you don’t have. And who knows . . . maybe it will be that much easier for you to learn another programming language after this.

Take a breath. Relax. Why don’t you go play around in WorldEd a bit. Make a town . . . make some NPCs . . . write some dialogs. Plan out some quests. Think about scripts, but stress out about getting them written. If you’re really hot to script, read the list of scripts again. I find myself re-reading that list frequently. Sometimes I’ll even get the first seeds of a quest idea from a particular statement . . .

Don’t worry about the scripting. You’ll learn it. I promise. Well, I don’t promise, but I’ll do my best.

Where Am I Now?

You should have an idea of what variables are in Arcanum Script. OBJ Variables are the *things* in the world, and NUM variables are essentially numbers . . . and those numbers can actually be the name of things.
You should know that the variables are used to fill in the blanks of the scripting statements.
You should also have an idea of scope. Where a variable can be seen. Local, Global, and Player.

If you’re still a little unsure, don’t worry about it. Go ahead and plow through this a little more. But make sure you go back and re-read those sections again later if you’re still confused.

Action vs. Conditional

Now might be a good time to re-read the list of Arcanum Script statements. Just the list from the table of contents will do. No? Fine, be that way.

Action statements are just that. ACTION! They get things done. Killing, moving, giving, taking, creating, teleporting. Those are all action statements. And they are the obvious ones. There are some not so obvious action statements like setting flags or increasing numbers. Storing a players statistic in a variable. Those are actions as well.  Actions are generally easier to understand for first time Acranum Scripters, since they are pretty straight forward.

Conditionals are like questions. Are all the wolves dead? Is something open? Is it an animal? Is is undead? Conditionals allow your script to make decisions based on certain conditions in your game. Conditions? Conditional? Get it? Get it? All conditonals are in what’s known as an If/Then/Else structure. Think of it like this: If Arcanum 2 is released, then I am happy. If not, I am sad. Just substitute « if not » for « Else » and you have conditional structure.  We will cover conditionals in more detail later.

Our First Script

We are now going to create our first script! Open up ScriptEd. If you’re using SockMonkey, you’re on your own. The first thing you need to do with any new script is determine what number it is. As mentioned in the NUM variables section, everything in Arcanum has a number. Your scripts can have any number from 1-996. You cannot have two scripts with the same number. What you need to do is find an availabe number.
Go to File->Save Script As . . . and browse to your scr directory. At the very least, you should see three scripts:


You’ll notice that each file has a five digit number as a prefix. This represents the script’s number or ID. Look through the list and see what numbers are available. For the sake of argument, we’ll pretend that 666 is our next available number. Now press Cancel to close the file browsing window. We don’t want to save anything until we’ve told ScriptEd what the number of this script is.
Now go to Script->Set Script ID. Enter your number (666 if you’re blindly following my instructions) and press OK.
Personally, at this point I also like to set the description and then save the empty file. To do this, go to Script->Properties and in the description box type: « Tutorial Script » or whatever strikes your fancy. This description is just for you, so when you later open a script, it should help jar your memory. Then go to File->Save Script As . . . and type in a name. DONT TYPE IN THE NUMBER. ScriptEd handles this for you automatically. Just give it some kind of meaningful name. Personally, I find it easier to see the numbers of my scripts if I start all my names with an underscore « _ ». If you need help here, just type « _Tutorial_Script » I pretty sure you can’t use spaces in the filename.

ScriptEd Feature Alert: You can also use the description field as a way to organize your scripts. ScriptEd can sort your script by ID, filename or description. If you adopt a naming convention with your description field, say always starting with a town name or NPC name, it will be easy to see all those script grouped together.

Now that your script is save, let’s start scripting! From the menu, select Script->Action. You’ll notice that the shortcut key for this is CRTL+A. From now on when I say « Place an action statement » you can either type it yourself, go to the menu, or use CTRL+A.
You have an « Add A Statement » box open. If the list box isn’t selected (the text is blue), press TAB until it is. Now type « k ». Ooooh, pretty slick! The newest version of ScriptEd will look for the first « k » action statement. Since this is the one we want, click OK.
Our script should now look like this:

description « Tutorial Script »

kill (obj)

Well, the first thing we need to do is replace (obj) an appropriate variable. So, what do we want to kill? Where do you get an appropriate variable? From the list on page 71! Let’s go back and take a look at that list again. Read through each one of OBJ variables, mentally filling it into the kill (obj) statement.

You’ll notice right away that some of them don’t make any sense. You can’t kill Every Scenery. And what the hell is Current Looped Object? Don’t worry about those, we’ll get those later. Let’s pick we’re pretty sure we know what it does: Everyone in Vicinity.
We need to replace (obj) with Everyone in Vicinity. Highlight (obj), right click and then choose it from the list.

ScriptEd Feature Alert: There are Shortcut Strings you can also use in ScriptEd to replace (obj) with an OBJ variable. You can see the full list of them under Help->Reference Sheet. Scroll to the top of that window. You may want to skip them for now, but keep it in mind for later.

All scripts should also have at least one « Return » statement. We’ll get more into return statement in a bit. For now, place another action statement: return and RUN default. Let’s compile and save what we have. File->Save Script will of course save your script. It will also automatically compile it for you. Hopefully there are no errors. If you have an error, erase the statements and try again. This should be your script so far:

0. kill Everyone in Vicinity

1. return and RUN default

You will notice that ScriptEd automatically numbers the lines for you, starting at zero.  Zero is the first line of your script and under most circumstances where your script begins executing.  The script continues to be processed until it hits a return statement, then the script stops.

How Does My Script Get Run?

So you’re starting to get some basic ideas of the scripting language. Armed with your knowledge of variables, you could probably read through the list of statements and imagine filling in the blanks. Excellent! And we now have our first lethal looking script.

But how do we get a script to execute? Good question!
There are three ways to get your scripts in Arcanum to execute:

1) A Player’s interaction with something that has a script attached to it.
2) Triggered by a critter walking over a tile or sector with a script attached to it.
3) Calling a script from a script or dialog.

For now, we are going to concentrate on the first one. The other two will get covered later.  To know how to get your scripts executed at the right time, you need to know about attachment points.

Attachment Points

Attachment points are used to tell the Arcanum Engine that you want something in particular to happen when a certain event occurs. You accomplish this by attaching a script to that event on the person or object in question. If we are tracking the number of rats killed in the cellar, we would attach a script to the DYING point of each of the rats. As each rat is killed, the script is called that keeps a running count of dead rats.

There are 36 attachment points, and guess what? It’s list reading time! Open your WorldEd Manual to the bottom of page 103. Read the list of attachment points. Pay particular attention to the « when called ». Knowing this will be very important when deciding where to attach your scripts.  I’m not going to go over each Attachment point.  The manual does a pretty good job of explaining each one.

Some of the sharper pencils out there may have noticed the list of attachment points above where I had you read. Well, since you’ve asked . . . like almost anything important in Arcanum, each of the 36 attachments has a number. For now you don’t need to worry about their numbers. We’ll get to that later.

Now we’ve come across some familiar terms again. Triggerer, Attachee, and Extra Object. Where did we see these before? On page 71 of the WorldEd Manual when we were learning about OBJ variables. Triggerer, Attachee and Extra Object are all OBJ variables. These variables are set to a specific value when your script is called. The list of attachment points on page 103 tells you what values the variables are assigned.

As you can probably guess, Triggerer is the object that caused the script to run. Attachee is the object the script is attached to. Extra Object is usually NULL (meaning no object), unless the attachment point involves three object. For example, TRANSFER occurs between and Attachee and Triggerer with the item being transfered as the Extra Object.

So, let’s get back to our Tutorial Script. We’re itching to kill everyone in the vicinity so let’s attach that bad boy to something. First, you’ll need WorldEd open. All you 1074 folks out there should already have WorldEd open. Go to your Scripting Tutorial map or where ever your testing ground will be. Since this is a killing script, we’ll need some cannon fodder. Drop down a few NPCs. You probably don’t want to put down any monsters, since by default they will try to kill you.

Before we decide where to attach this script, lets take a look at the WorldEd Manual, page 72. The description for « Everyone in Vicinity » says « every critter who is on-screen near the attachee ». This is very important. The OBJ variables that refer to things in the « Vicinity » all use the Attachee OBJ to determine the Vicinity. Since we are killing everyone in the vicinity, we’ll want our attachee to be far away from us.

OK, back to WorldEd. We’ve got our vic- volunteers on the map. Let’s put a Tree Stump Of Death in the middle of them. Go to Enviornments->Wood and just pick any old tree stump. After placing it, right click and choose « Edit » Click « Flags » and uncheck the « Click Through » flag.

Now let’s attach our script. We’ll start off the very first attachment point EXAMINE. Click on the « Scripts » button. Wow! Look at all those radio buttons! You want to select the « Examine » radio button. Now in the « Script » box at the bottom of this form, type in the ScriptID you used. 666 if you’re following me. Click OK. Now you probably will get a message box saying it can’t get the default values so it will use zeroes. We are not going to cover default values in this document, so don’t worry about it. Essentially it means WorldEd couldn’t find your script, but don’t worry. If you are following my directions, your script is fine.

Now set the start point to be somewhere near this testing area, save and exit WorldEd then load your module!

Once in the module, go ahead and put your mouse over the stump for a festival of carnage! One thing you will notice is that « Vicinity » is actually a pretty wide area. You have to extra careful not to get yourself killed as well. If you die (and you probably will), try it again and try and get a sense of how far « Vicinity » covers. If by chance nothing happens, you may need to start this section again.

So that’s attachment points.  Not so bad. 

To SKIP or to RUN That Is The Question

What the the two « return » statements used for?  These are like the traffic cops of your scripts.  Both have the same immediate affect of halting execution of your script.  Take a look at the following example:

0. grant one fate point to Player
1. return and RUN default
2. kill Everyone in Vicinity

Looks like a pretty nasty script.  But in fact, as it stands now, this script is harmless.  Without using more advanced tricks you haven’t learned yet, there is no way for the statement on line 2 to get executed (no pun intended).  If this script was attached to something and then triggered normally, it would give the Player a Fate Point and then stop.  Everyone in the vicinity would be fine.

OK, so in general the two return statements stop execution of a script.  But is the difference between them?  As I said, they are like traffic cops.  RUN default directs the Arcanum Engine to do whatever it was going to do before the script was run.  SKIP default tells the game engine not to bother with the normal action of it’s attachment point.  You’ll find yourself using them in about equal measure, so it’s important to know what the effect each one has on it’s attachment point. 

Yup.  Back to the the Manual.  Page 103.  Each of the attachment points has a brief explaination of what SKIP default has on that attachment point.  When you start

Before we end this section, some people may want to know about the « advanced tricks » I mentioned.  We’ll cover those later when you learn about the goto statement and other ways to call a script.

Variable Names

OBJ variable names are easy, they are all on that list on page 71. NUM variable names are a little different.

Every variable needs to have a name. This is how the script can tell them apart. If you have one script keeping track of several different things, each variable need


IF something is true
THEN do one thing
ELSE do a different thing

THEN is always required. There is no point in having a condition statement and not doing anything about it.
ELSE is optional. Sometimes you’ll need it, sometimes you won’t.

Suppose you want to know if it is daytime or nighttime what statement do you need? Conditional. An easy one at that:


In Arcanum Script, loops are used to repeat a particular block of code on an OBJ variable collection.  You probably could say loop for Triggerer although it would be a waste of time.  You only want to loop for a collections of things.  In particular, you use the « Every » OBJ variables.