|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Sat Jun 01, 2002 11:24 pm
Alias creating another trigger and untriggering it |
How do you go about creating an alias that creates another trigger and a untrigger.
Something like...
I want to create an alias that when:
#alias autokillperson {#trigger {(%w) walks in.} {kill %1} {#untrig {(%w) walks in.}}
This doesn't work because it's giving me wierd bracket errors. Also, I want to contain this trigger within a class.
Sup |
|
|
|
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Sat Jun 01, 2002 11:29 pm |
Best way to do this is by class juggling.
#ALIAS autokillperson {T+ autokilling}
#TRIGGER {(%w) walks in.} {kill %1;#T- autokilling} autokilling |
|
|
|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Sun Jun 02, 2002 12:45 am |
Is it cleaner to do it this way?
In means of efficiency and "the way to do things"?
Sup |
|
|
|
marilyn Newbie
Joined: 01 Jun 2002 Posts: 9 Location: USA
|
Posted: Sun Jun 02, 2002 12:52 am |
quote:
Is it cleaner to do it this way?
In means of efficiency and "the way to do things"?
Sup
I dont remember which version began triggers with states. The examples given in explanation in the article on them were ... well.. less than useful to me, and I haven't gotten one to work yet, BUT.. I can tell you that you can use trigger states to do what you want.
The 0 state pattern would be "X enters" and you would proceded to kill. Once X enters, the trigger state advances to 1, where the pattern is "YOu kill X!" whereupon the trigger returns to 0 state and waits for X to arrive again.
Mari
Jade is more than stone, more than color. It is beauty made tangible. |
|
|
|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Sun Jun 02, 2002 12:56 am |
Well, the reason I want to do this is because, I want to have control of when I want to kill someone when he/she walks in. But currently, if I triggered to kill the person when the person walks in, it would constantly keep killing the person as long as the person keeps walking in.
Basically, by creating an alias, I can control to kill him when he comes in and then would have to hit the alias again if I want to kill him again. Other than that, I want a one time kill person.
Sup |
|
|
|
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Sun Jun 02, 2002 2:36 am |
Well, maybe instead of creating a claas for the trigger you can add an id for it, but yes, it is EXTREMELY efficient for the purpose you desire.
Alot better than making a trigger a deleting a trigger over and over agian anyways. |
|
|
|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Sun Jun 02, 2002 2:37 am |
Kewl thanks dacheeba.
Sup |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Jun 02, 2002 2:55 am |
Just being sure you realize, this will attack the first person to walk into the room -- not a specific person.
LightBulb
Vague questions get vague answers |
|
|
|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Sun Jun 02, 2002 3:16 am |
Oh I know, it's just an example I used. It's a bit more complicated than that but just needed to grab some ideas on going about it.
Sup |
|
|
|
|
|