 |
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: Mon Nov 14, 2005 6:20 am
Quick automapper trigger question |
First question is, is there a way to set a temporary trigger that will fire the next time i enter a given room on the automap.
Thanks for all your help guys.
_UMDBANDIT! |
|
_________________ Rufus- Winner of Stuff |
|
|
 |
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Mon Nov 14, 2005 6:46 pm |
Combining an onroomenter alias with #temp is not a good idea. While it would create a temporary trigger, it would do so for all rooms that you enter. This is probably a better way of doing it:
#TEMP {^roomname} {do something}
If this needs to be performed regularly, you can always define an alias to define this temporary trigger and call it from the mapper from the directions you enter the room from.
#ALIAS {runtemp} {{#TEMP} {^roomname} {do something}}
Remember to define the exits using the runtemp alias. |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Nov 14, 2005 9:31 pm |
This is what the room scripts are for. When you enter the room, the script is written into your settings file in the _MapperRoom folder. This folder remains active when you are in the room, though the scripts contained therein follow normal rules of execution (temporary triggers delete themselves upon firing, etc). When you leave the room, the _MapperRoom folder and all settings contained therein are deleted.
NOTE: it appears there might be a bug regarding temporary triggers, at least, wherein if you leave the room before the script executes it never gets deleted even though the folder is. Still trying to figure out whether this is an actual bug or something caused by what my scripts are doing/mapper file corruption. |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: Mon Nov 14, 2005 10:47 pm replying |
So here's in regards to that temp triggering:
Is there a way i can set a trigger that will fire when a variable equals a certain thing? For instance if i had a variable called @Room, I could make something that fired when @room = the room i wanted it to equal.
MattLofton, the point of my script so far is to make a program that will allow my character to hunt on a euclidian section of the plane. It follows a set path around the plane, and then when it kills something, it pathfinds back to the shop to sell and deposit the gold, and then pathfinds back to where it was before, and then continues on the path. So what happens, is that this room that it is going to and from, is different every time it kills an enemy. So making a room script for that is pretty unfeasable. And because its just for that one kill, thats why i want it to fire just once.
So i am able to add into my script a line that stores the room number in variable like i said above. I'm pretty blanked out about how to do this. Here's some potential problems. If i turn on the flag for it to walk the path before it is back at the room where it was, itll think it passes a step whenever it sees a prompt. If i use the wait command, then i am at the mercy of the latency of my connection. Thats all i can think of for now. Any ideas tips suggestions would be great :)
Thanks as always. You guys got me to where i am, and I am damn close to getting this thing to work as i imagined it !!!!
UMDBANDIT |
|
_________________ Rufus- Winner of Stuff |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Nov 14, 2005 11:55 pm |
Oh, in that case, check out the %roomvnum() function. If you leave the arguments blank, that will pull the vnum for the room you are currently in. Then all you need to do to verify location is to compare the vnum in your variable with the %roomvnum() output.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
|
|
|