Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ VBscript ➜ Variable and trigger issues

Variable and trigger issues

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Madrox   (40 posts)  Bio
Date Tue 03 Oct 2006 03:40 AM (UTC)

Amended on Tue 03 Oct 2006 03:56 AM (UTC) by Madrox

Message
Basicly what im tryin to do is capture right and left leg attacks seperately. The trigger I have for the left leg works fine. But not for the right. This is what im capturing.



Taking a step back, you lunge forward with a hooking cut across Helios's right
leg.


Taking a step back, you lunge forward with a hooking cut across Helios's left
leg.


And this is what I send

<triggers>
<trigger
enabled="y"
expand_variables="y"
ignore_case="y"
keep_evaluating="y"
match="*Taking a step back, you lunge forward with a hooking cut across *'s right*"
send_to="12"
sequence="100"
>
<send>setvariable "rleg", CInt(getvariable("rleg"))+1</send>
</trigger>
</triggers>

<triggers>
<trigger
enabled="y"
expand_variables="y"
ignore_case="y"
keep_evaluating="y"
match="*Taking a step back, you lunge forward with a hooking cut across * left *"
send_to="12"
sequence="100"
>
<send>setvariable "lleg", CInt(getvariable("lleg"))+1</send>
</trigger>
</triggers>


Any reasons why one would work and not the other would be GREAT. Or any sulitons. :)

EDIT: Also I tried it with out the 's after the wildcard too. No luck there either.

EDIT: ALSO also I toyed with the variables a bit. set rleg to 10 and lleg to 8 to see if the script im using this for works right when rleg is > and when i went back to look at the value of rleg it was set to one again.
Top

Posted by Onoitsu2   USA  (248 posts)  Bio
Date Reply #1 on Tue 03 Oct 2006 09:21 AM (UTC)
Message
well since left works, I would recommend changing the trigger for the right leg to the same design, that being...

match="*Taking a step back, you lunge forward with a hooking cut across * right *"

you have this currently...

match="*Taking a step back, you lunge forward with a hooking cut across *'s right*"

there is no space after the word right, and also there is the 's after the *, and I know that it said in ut edit that u removed that, but I am just stating this to be entirely clear on this.

I think that should fix ur issue here...

Laterzzz,
Onoitsu2
Top

Posted by Madrox   (40 posts)  Bio
Date Reply #2 on Tue 03 Oct 2006 02:38 PM (UTC)

Amended on Tue 03 Oct 2006 02:53 PM (UTC) by Madrox

Message
Okay I copied it exactly how i had it. And it still wont work. I even checked keep evaluating JUST incase still nothing.
Top

Posted by Madrox   (40 posts)  Bio
Date Reply #3 on Wed 04 Oct 2006 01:01 AM (UTC)
Message
Okay, so I did some bug testing. with world.note. To send a not every time the trigger is matched as well as add to the variable with

setvariable "rleg", CInt(getvariable("rleg"))+1

Which works fine for the variable lleg with the exact same syntax minus but with rleg as the variable of course. And it still wont increment. Any ideas why?
Top

Posted by Nick Gammon   Australia  (23,099 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 04 Oct 2006 03:16 AM (UTC)
Message
Can we clarify - is the problem here it isn't matching, or isn't adding?

If you add a Note to the trigger, does the note appear for either leg?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Madrox   (40 posts)  Bio
Date Reply #5 on Wed 04 Oct 2006 03:27 AM (UTC)
Message
Aye, the trigger is matching. Both notes fire fine. Lleg incremnts fine. I changed rlegs variable name and now it increments fine. Maybe it's a bug not sure heh
Top

Posted by Nick Gammon   Australia  (23,099 posts)  Bio   Forum Administrator
Date Reply #6 on Wed 04 Oct 2006 04:01 AM (UTC)
Message
What other triggers do you have? I am guessing something else sets rleg back to 0, or clears it, or something.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,099 posts)  Bio   Forum Administrator
Date Reply #7 on Wed 04 Oct 2006 04:09 AM (UTC)
Message
You can check quickly if you have lots of triggers.

In the trigger list dialog, click on the "..." next to "Filter by:" checkbox, and enter this:


function filter (s)
  return GetTriggerInfo (s, 2) == "rleg"
end


Close that dialog and then click on "Filter by:" and any triggers that affect "rleg" should then be displayed in the list. Uncheck the box to return to normal operation.

If necessary do the same to aliases and timers.

What that filter function does is match on any item that has "rleg" in the "send" box.

For aliases it would be GetAliasInfo (s, 2), and for timers it would be GetTimerInfo (s, 4).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Madrox   (40 posts)  Bio
Date Reply #8 on Thu 05 Oct 2006 01:22 AM (UTC)
Message
Nope, no other RLEG found. Heh, really weird don't know why it wont work. Maybe it was faulty syntax on my part not quite sure. But I copied and pasted EVERYTHING to make the new variable, and yah it works fine.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


22,818 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.