YesNoOk
avatar

Health bar not showing (Explod) (Read 2663 times)

Started by Alchemist, May 12, 2008, 01:22:13 pm
Share this topic:
Health bar not showing (Explod)
#1  May 12, 2008, 01:22:13 pm
  • avatar
  • ***
  • Welcome to Die!
Hey!

got a small problem, trying to make some custom health bars but my explod doesn't seem to be working correctly, here's what i got:

State - 2:

Quote
[State -2, Health Meter]
type = Helper
trigger1 = numhelper(19300) < 1
trigger1 = var(58) = 1 ; is Bleach Mugen
id = 19300
name = "Health Meter"
postype = p1
pos = -99999999999,-99999999999
stateno = 19300
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1
facing = facing*ifelse(teamside=1,1,-1)
sprpriority = 7

[State -2, Health]
type = Varset
trigger1 = teammode = single
trigger1 = var(58) = 1 ; is Bleach Mugen
fvar(10) =(Life/100)
;ignorehitpause = 1

Quote
[Statedef 19300]
type    = A
movetype= A
physics = N
anim = 19500 ; Blank image
sprpriority = 0

[State 19300, Explod] ;Health Bar
type = Explod
trigger1 = numexplod(19510) = 0
trigger1 = teamside = 1
anim = 19510
id = 19510
postype = left
pos = 0,60
ownpal = 1
bindtime = -1
supermove = 9999999999
pausemove = 9999999999
ignorehitpause = 1
ontop = 1
facing = 1
sprpriority = 6

[State 0, ModifyExplod]
type = ModifyExplod
Id = 19510
trigger1 = 1
scale =(root,fvar(10)/10),1
bindtime = -1

problem is the little code in scale, if i leave it at 1,1 it's fine, but if i express it that way which is still 1,1 it doesn't show up at all, any ideas ?  :)
My youtube channel: http://www.youtube.com/user/AlchemistMI

Alchemist AKA Alcheymyst AKA H.F.C Alchey
Re: Health bar not showing (Explod)
#2  May 12, 2008, 01:53:12 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Add a displaytoclipbord and see what the fvar is, not quite sure if this will change anything, but when you split it by 100 and 10, and a float of 0, like this: 100.0 and 10.0
My shitty mugen stuff:
Re: Health bar not showing (Explod)
#3  May 12, 2008, 02:27:35 pm
  • avatar
  • ***
  • Welcome to Die!
Thanks Anjel, 1st steps sorted, it came out as 0 for some reason, I just used this instead:

[State 0, ModifyExplod]
type = ModifyExplod
Id = 19510
trigger1 = 1
scale =(root,const(data.life)/1000.0),1.0
bindtime = -1

but now when hit the scale doesn't move, any thoughts  ???
My youtube channel: http://www.youtube.com/user/AlchemistMI

Alchemist AKA Alcheymyst AKA H.F.C Alchey
Re: Health bar not showing (Explod)
#4  May 12, 2008, 02:35:47 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
const(data.life) is a constant, it's the maximum life the character has, so no doubt the scale doesn't move

Just do as you did I guess, but like this :

scale =(root,fvar(10)/10.0),1

Notice the 10.0 instead of 10. In fact, using only y=x/10 converts y into an integer, even if x is a float. That's why you have to use y=x/10.0, to keep y as a floating number.
Re: Health bar not showing (Explod)
#5  May 12, 2008, 02:41:19 pm
  • avatar
  • ***
  • Welcome to Die!
now it doesn't show  :S , also changed:

[State -2, Health]
type = Varset
trigger1 = teammode = single
trigger1 = var(58) = 1 ; is Bleach Mugen
fvar(10) =(Life/100.0)

[State 0, ModifyExplod]
type = ModifyExplod
Id = 19510
trigger1 = 1
scale =(root,fvar(10)/10.0),1
bindtime = -1

weird? even if i just set fvar(10) = life clipboard says it's 0  ???
My youtube channel: http://www.youtube.com/user/AlchemistMI

Alchemist AKA Alcheymyst AKA H.F.C Alchey
Last Edit: May 12, 2008, 02:47:18 pm by Alchemist
Re: Health bar not showing (Explod)
New #6  May 12, 2008, 03:14:01 pm
  • avatar
  • ***
  • Welcome to Die!
yay  ;D , works, now a more pressing issue, it works when i removed var(58) , var(58) is set in config.cns like this:

[Statedef -2]

[state -2, varset]
type = varset
trigger1 = 1
var(58) = 1 ; Is Bleach

any reason as to why that would effect it so much, because i'm using this to distinguish from normal mugen and the fullgame ?

*Dont worry Fixed*
My youtube channel: http://www.youtube.com/user/AlchemistMI

Alchemist AKA Alcheymyst AKA H.F.C Alchey
Last Edit: May 12, 2008, 07:41:17 pm by Alchemist