|
Kison Beginner
Joined: 02 Aug 2004 Posts: 18 Location: Right Here!
|
Posted: Mon Aug 02, 2004 7:21 pm
Zuggsoft Script Tutorials |
Hey all,
Sorry if this is in the wrong spot. Are there any tutorials out there for Zuggsoft scripts? If so, could someone post a link? Very appreciated. Thanks.
Kison. |
|
_________________ Try me, yet remember the price of failure. |
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Mon Aug 02, 2004 8:37 pm Re: Zuggsoft Script Tutorials |
Kison wrote: |
Hey all,
Sorry if this is in the wrong spot. Are there any tutorials out there for Zuggsoft scripts? If so, could someone post a link? Very appreciated. Thanks.
Kison. |
Take a look at http://www.zuggsoft.com/library/ |
|
|
|
Kison Beginner
Joined: 02 Aug 2004 Posts: 18 Location: Right Here!
|
Posted: Mon Aug 02, 2004 10:28 pm |
Well, I looked there and didn't find my answer. I guess I might as well just ask.
How can you stop a trigger? Say I want it to stop running if variable "a" is set to 1. What command would I use? I saw it mention #STATE, but that didn't work out.
Also, is there an else if or else type of option?
Basically, what I am trying to script is this. I have 6 exits in a room. I need to search each direction until I get a specific message. Once I get the message, I will set a variable for that exit to 1. So each time I get that message, it'll search through each of the 6 variables, 1 for each exit, until it finds one that is set to 0, which indicates that it has not been searched yet. Once it reaches that, it'll search the next exit, and set the previouse exit to 1, to indicate that it has been searched. Once I run out of exits, I will move a room, and search that room.
I'd post what I have but it's a bit crusty. :P |
|
_________________ Try me, yet remember the price of failure. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Aug 03, 2004 2:27 am |
You can use #T- to disable a trigger by disabling the class it's in. #T- can also be used to disable the trigger itself, either by the trigger ID (if you've given it one) or its pattern.
A trigger can also effectively be disabled by putting all its commands into an #IF.
#TR {pattern} {#IF (@a = 0) {do stuff}}
Yes, since #IF allows two sets of commands, one for true and one for false, there are equivalents of else and elseif. The else is just the false set of commands, while else if is merely putting another #IF into the false set of commands.
#IF (condition) {then} {else}
#IF (condition1) {then} {#IF (condition2) {elseif}}
Instead of using variables for every exit, just use one variable and count. You'll probably want a second variable with a list of the exits.
#VAR ExitsSearched 0;#VAR Exits {north|east|south|west|up|down}
#IF (@ExitsSearched < 6) {#ADD ExitsSearched 1;search %item( @Exits, @ExitsSearched)} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
Kison Beginner
Joined: 02 Aug 2004 Posts: 18 Location: Right Here!
|
Posted: Tue Aug 03, 2004 2:56 pm |
Thanks man. The array thing helped a ton.
|
|
_________________ Try me, yet remember the price of failure. |
|
|
|
|
|