Hey,
I have a trigger that works fine at the moment. It recently decided to add a new feature to it where it will disable itself automatically if my health goes below a certain value. I am able to get my health from the prompt fine, and I have coded all the matches, but it seems even when my health goes below the value I have set, it doesn't disable. Here is the code:
Sub huntCheck (sName, sLine, Wildcards)
dim Health_Status <-- If health goes below this, disable
dim Health <-- Current health
dim Status <-- Checks if the trigger is enabled in the first place
Health_Status = world.GetVariable("healthTrigger")
Health = Wildcards(1)
world.Note Health <--- Displays the correct health / Just there as a test
if Health < Health_Status then
Status = world.GetVariable("hunt")
if HuntStatus = "1" then
world.EnableTrigger "OnLeaving", 0
world.Note "Health Below " & Health & ". Hunt Trigger Disabled."
end if
end if
end sub
My gut feeling is that I am matching strings, so the numeric matching operators aren't going to work. Does that sound reasonable? If so can I convert the health and health status to numbers or is there a string comparison function?
Thanks a lot,
C-
I have a trigger that works fine at the moment. It recently decided to add a new feature to it where it will disable itself automatically if my health goes below a certain value. I am able to get my health from the prompt fine, and I have coded all the matches, but it seems even when my health goes below the value I have set, it doesn't disable. Here is the code:
Sub huntCheck (sName, sLine, Wildcards)
dim Health_Status <-- If health goes below this, disable
dim Health <-- Current health
dim Status <-- Checks if the trigger is enabled in the first place
Health_Status = world.GetVariable("healthTrigger")
Health = Wildcards(1)
world.Note Health <--- Displays the correct health / Just there as a test
if Health < Health_Status then
Status = world.GetVariable("hunt")
if HuntStatus = "1" then
world.EnableTrigger "OnLeaving", 0
world.Note "Health Below " & Health & ". Hunt Trigger Disabled."
end if
end if
end sub
My gut feeling is that I am matching strings, so the numeric matching operators aren't going to work. Does that sound reasonable? If so can I convert the health and health status to numbers or is there a string comparison function?
Thanks a lot,
C-