|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Fri Oct 15, 2010 5:00 am
Room Scripts |
So I have a script that should fire when ever I enter a room
Code: |
#IF (@pathBool) {@pathBool=0
#STEP 2sl5e4nwe2n3e4s6w4n2e2w4s3u4n6e3wsw2ewn3w4s3d3e2s5wh2n
#PAUSE} {
@pathBool=1
}
|
According to the debugger the script is not compiling, can anyone see why? |
|
_________________ <Clever text here> |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Oct 15, 2010 7:32 am |
Try this...
Code: |
#IF (@pathBool) {pathBool=0
#STEP 2sl5e4nwe2n3e4s6w4n2e2w4s3u4n6e3wsw2ewn3w4s3d3e2s5wh2n
#PAUSE} {
pathBool=1
} |
I am assuming you want to set the pathBool variable to 1 or 0, and set a variable whose name is the value of '@pathBool'. |
|
_________________ Asati di tempari! |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Fri Oct 15, 2010 6:12 pm |
Yes I am using a variable as a bool named pathBool, and it is either 1 or 0. The script compiles now thank you! But it does not work as intended. When I am standing in the room if I enter
#STEP 2sl5e4nwe2n3e4s6w4n2e2w4s3u4n6e3wsw2ewn3w4s3d3e2s5wh2n;#PAUSE
in the command prompt
I can then #STEP though the whole path, but when I have the room script send the command it will step one south, then I can no longer #step through the path, its as if the path ceases to exist once I exit the room. When I look at the debugger it just says
Comline start
Comline stopped
I sort of thought that the path was queued once the command was sent, is it queued in the scope from which it was called? |
|
_________________ <Clever text here> |
|
|
|
|
|