Variable and trigger issues

Posted by Madrox on Tue 03 Oct 2006 03:40 AM — 9 posts, 32,110 views.

#0
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.
Amended on Tue 03 Oct 2006 03:56 AM by Madrox
USA #1
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
#2
Okay I copied it exactly how i had it. And it still wont work. I even checked keep evaluating JUST incase still nothing.
Amended on Tue 03 Oct 2006 02:53 PM by Madrox
#3
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?
Australia Forum Administrator #4
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?
#5
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
Australia Forum Administrator #6
What other triggers do you have? I am guessing something else sets rleg back to 0, or clears it, or something.
Australia Forum Administrator #7
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).
#8
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.