Page 2 of 4

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Fri Jan 17, 2014 11:23 pm
by Jor'Mox
Well, that is the problem. Your prompt looks like this: 100/500 > instead of 100 / 500 >
So you need to take out the spaces in the trigger pattern around the slash. So you should use this as the pattern: ^(\d+)/(\d+) >$

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:10 am
by trentont101
updated,
still not working :(
:(
could it be that the prompt is color coded, as in the color of the numbers changes if the health goes down or up???

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:23 am
by Akaya
I see a grey box on your screen there... If its displaying a grey box instead of a gauge, you might need to apply a stylesheet...
Code: [show] | [select all] lua
hpbar = Geyser.Gauge:new({
  name = "hpbar",
  x = "60%", y = "20%",
  width = "45%", height = "5%",
})
hpbar.front:setStyleSheet([[
  background-color: grey;
]])
hpbar.back:setStyleSheet([[
  background-color: red;
]])
You should be able to see some changes with the color.

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:24 am
by trentont101
still not working, even when I removed the spaces to fit the prompt accordingly,
could the culprit be that the prompt is color coded and changes color when health goes up or down??
this shouldnt change the actual prompt search right?

trying the style sheet now

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:30 am
by trentont101
ok here is my script now

hpbar = Geyser.Gauge:new({
name = "hpbar",
x = "60%", y = "20%",
width = "45%", height = "5%",
})
hpbar.front:setStyleSheet([[
background-color: grey;
]])
hpbar.back:setStyleSheet([[
background-color: red;
]])

current_health = matches[2]
max_health = matches[3]
hpbar:setValue(current_health or 0,max_health or 1)

now i am getting the error
attempt to index global matches a nil value... did i install the script wrong?

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:33 am
by Akaya
Delete the following from the script. You only need it in the trigger:

current_health = matches[2]
max_health = matches[3]
hpbar:setValue(current_health or 0,max_health or 1)

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:36 am
by Akaya
And no. The color of the prompt shouldn't effect capturing it. You can add a confirmation echo to the end of your trigger to make sure its working...
Code: [show] | [select all] lua
echo("\nHooray! It worked!")

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:38 am
by trentont101
ok yes, i realized i doubled that up, i deleted it, it not will run without the error, changed background color to green (so i get more of an indicator) and now i have a green bar across my screen (prettier than the grey haha) still not reacting to my prompt though

ok, echo is NOT working, so something has to be up with the trigger.

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 12:50 am
by Akaya
post another screenshot of your trigger?

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 1:15 am
by trentont101
http://postimg.org/image/uv3wsw23f/

http://postimg.org/image/dvuydmqvv/

for anyone with the same problem as me... i will write a detailed post at the VERY END when its working to help you all out I PROMISE!!