2 Replies
Walt Hamilton

The important thing to remember about variables is that SL is like someone with Alzheimer's; it can only remember what it can see. Variables are just a way to write notes so it can remember things later on. Whenever it looks at the note, it can tell that something happened earlier. For example: LookedAtLayer2 is True means that the user looked at layer 2.

Triggers always do what they are supposed to do.... unless someone comes along and tells them to do it only if certain conditions are met.

Example: Dad is eating supper with the kid and Mom has gone to get ice cream. Trigger for kid is "Eat ice cream when Mom gets home IF you have eaten your veggies." Since Dad has to leave, he leaves Mom a note: Kid has eaten veggies, and he leaves. A few minutes later, Mom comes in and says I told you "Eat ice cream when Mom returns IF it is True you have eaten your veggies." Kid shows Mom note from Dad (to prove he didn't just dump them), and Mom lets him eat ice cream. Kid is SL object, command to eat is trigger, note is variable, and IF you have eaten ice cream is condition.

Finally, don't add variables to your course to make it better. They won't. Only use them if you have to have them to make it work. If you are not writing triggers with conditions (Do this IF this condition is met) you don't need variables.