|
snowcat Newbie
Joined: 28 Jan 2006 Posts: 3
|
Posted: Sat Feb 04, 2006 2:03 am
random mazes |
I'm currenly writing on a trigger to walk around random mazes that only contain north, east, south, and west and do not form a square in the middle. , i have a problem that it fires an newly #T+ trigger.
Code: |
#CLASS {maze}
#TRIGGER {^Forest exit- north、southwest } {#T- maze}
#CLASS 0
#CLASS {maze|maze_north} {disable}
#TRIGGER {You hit your head on a tree} {#T- maze_north;#T+ maze_west;w} "" {disable}
#TRIGGER "mazen" {^Forest-%s(*)} {maze_exitline=%1
#VAR maze_Y %match( @maze_exitline, "、") //multiple locations
#VAR maze_X %match( @maze_exitline, "east") //can go east or not
#IF (@maze_Y>0 and @maze_X>0) {#T- maze_north;#WA 500;#T+ maze_east;east} //can hug right
#IF (@maze_Y>0 and @maze_X=0) {#WA 500;north} // multiple location but can't go right, continue
#IF (@maze_Y=0) {#T- maze_north;#WA 1000;#T+ maze_south;south} //deadend
#SHOW maze_Y = @maze_Y
#SHOW maze_X = @maze_X} "" {notrig}
#CLASS 0
#CLASS {maze|maze_east} {disable}
#TRIGGER {You hit your head on a tree} {#T- maze_east;#T+ maze_north;n} "" {disable}
#TRIGGER "mazee" {^Forest-%s(*)} {maze_exitline=%1
#VAR maze_Y %match( @maze_exitline, "、") //multiple locations
#VAR maze_X %match( @maze_exitline, "south") //can go east or not
#IF (@maze_Y>0 and @maze_X>0) {#T- maze_east
#T+ maze_south;#WA 500;south} //can hug right
#IF (@maze_Y>0 and @maze_X=0) {#WA 500;east} // multiple location but can't go right, continue
#IF (@maze_Y=0) {#T- maze_east;#T+ maze_west;#WA 500;west} //deadend
#SHOW maze_Y = @maze_Y
#SHOW maze_X = @maze_X} "" {notrig}
#CLASS 0
#CLASS {maze|maze_west} {disable}
#TRIGGER {You hit your head on a tree} {#T- maze_west;#T+ maze_south;s} "" {disable}
#TRIGGER "mazew" {^Forest-%s(*)} {maze_exitline=%1
#VAR maze_Y %match( @maze_exitline, "、") //multiple locations
#VAR maze_X %match( @maze_exitline, "north") //can go east or not
#IF (@maze_Y>0 and @maze_X>0) {#T- maze_west;#T+ maze_north;#WA 500;north} //can hug right
#IF (@maze_Y>0 and @maze_X=0) {#WA 500;west} // multiple location but can't go right, continue
#IF (@maze_Y=0) {#T- maze_west;#T+ maze_east;#WA 500;east} //deadend
#SHOW maze_Y = @maze_Y
#SHOW maze_X = @maze_X} "" {notrig}
#CLASS 0
#CLASS {maze|maze_south} {disable}
#TRIGGER {You hit your head on a tree} {#T- maze_south;#T+ maze_east;e} "" {disable}
#TRIGGER {^Forest-%s(*)} {maze_exitline=%1
#VAR maze_Y %match( @maze_exitline, "、") //multiple locations
#VAR maze_X %match( @maze_exitline, "west") //can go east or not
#IF (@maze_Y>0 and @maze_X>0) {#T- maze_south;#T+ maze_west;#WA 500;west} //can hug right
#IF (@maze_Y>0 and @maze_X=0) {#WA 500;south} // multiple location but can't go right, continue
#IF (@maze_Y=0) {#T- maze_south;#T+ maze_north;#WA 500;north} //deadend
#SHOW maze_Y = @maze_Y
#SHOW maze_X = @maze_X} "" {notrig}
#CLASS 0 |
the problem is when #T- maze_north;#T+ maze_south, both maze_north and maze_south fires from one prompt.
eg. Forest -south
maze_north will sent command #T- maze_north, #T+ maze_south, and s
but maze_south initially disable will fire without seeing Forest -(*)
i don't know what's the problem in this triggers
help please. thank you. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Wed Feb 15, 2006 8:27 pm |
Acouple of time you turn on the class that fires NORTH and do not shut it off, this is where your problems lie.
Also useing #wait is horrible switch to #alarm, the wait command suspends allyou triggers from firing, so if you where ot get attaced or need to eat you could not during the #wait, While #alarm would allow you to do other things. |
|
_________________ megamog75
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|