Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
ToyMage
Apprentice


Joined: 01 Sep 2005
Posts: 120

PostPosted: Fri Jul 05, 2019 5:41 pm   

Trigger only once for match in list
 
Can anyone help?

I want a trigger to cast fireball (area spell) 3 times when I see the following... but when they are 2 or more of them in the room, the trigger cast multiple times of 3 times.

I only want it to cast 3 times, no matter how many matches it found.

A cat is here
A dog is here
A goat is here



anyone know how to do it?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Sat Jul 06, 2019 12:06 am   
 
simple, give it an ID, then have it turn itself off

Code:
#TRIGGER "tripleFirball" {* is here} {
    #LOOP 3 {fireball}
    #T- tripleFireball
}


Then you just need to turn it back on, either via walking:

#EVENT onRoomEnter {#T+ tripleFireball}

Or by some time delay:

#ALARM "keepFireballing" +30 {#T+ tripleFireball}

The last one can be added to the body of the trigger, it will only keep the trigger turned off for 30 seconds.
_________________
Discord: Shalimarwildcat
Reply with quote
ToyMage
Apprentice


Joined: 01 Sep 2005
Posts: 120

PostPosted: Sun Jul 07, 2019 3:16 pm   
 
ooo.. thanks thanks.. thats a different way of thinking..
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net