Help needed with a counter trigger

Post Reply
mohnkee
Posts: 3
Joined: Tue Jun 11, 2019 7:21 pm

Help needed with a counter trigger

Post by mohnkee »

Hello,
Very new to mudlet sorry in advance.

What I am looking to do -
A trigger that will do an action a set number of times (i.e. thrown knife at something 15 times)
In between said action, if something happens, like the something dies, the action resets back to 0 and starts the count of 15 again
However if the action completes the 15 sets, it triggers another set of commands, then continues with the original commnand X15 again

Any help would be greatly appreciated, thank you in advance

mohnkee
Posts: 3
Joined: Tue Jun 11, 2019 7:21 pm

Re: Help needed with a counter trigger

Post by mohnkee »

is there a countaction trigger on mudlet? like an if statement that counts a variable, for example, count "throw axe at target" 15 times, then if the mud give you a line of success, the count starts over, if it gets to 15 there is a -do final action- and resets counter to 0 to do another 15?

Kitaya
Posts: 7
Joined: Sun Mar 17, 2013 9:28 pm

Re: Help needed with a counter trigger

Post by Kitaya »

There isn't something exactly like what you described, but you DID describe the process for making it! To review, what we need to do is:
* count a variable up every time we throw our weapon
* react differently based on three cases:
- case one, something dies;
- case two, we reach 15 throws;
- in literally any other case, throw again.

To be certain here: does your game have some sort of 'balance' mechanic, where you must wait between actions? Or are you just meant to kind of spam away?

mohnkee
Posts: 3
Joined: Tue Jun 11, 2019 7:21 pm

Re: Help needed with a counter trigger

Post by mohnkee »

Hello,
Thanks for the response!

Yes there is a balance factor in the game. The scrip would have to read a line to make sure I am balance before starting the throw again. I figured I would just bring up a trigger in the function.

Kitaya
Posts: 7
Joined: Sun Mar 17, 2013 9:28 pm

Re: Help needed with a counter trigger

Post by Kitaya »

Sorry for the trouble getting back to you.

It is the other way around - the trigger fires the function. You'll want to fire your next throw on your balance, and keep track on the line you get about throwing an axe of how many times you've thrown.

Post Reply