YesNoOk
avatar

Custom Bars (Read 6197 times)

Started by 2OS, June 06, 2012, 11:11:19 pm
Share this topic:

2OS

Custom Bars
New #1  June 06, 2012, 11:11:19 pm
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
    • deuceovspadez.webs.com/
[Statedef -2]

[State Max]
type=varset
trigger1=  ;;  1 if Life or Power. whatever you want otherwise.
var(1)=life / power / your own value  ;;  PICK ONE
ignorehitpause=1
persistent=1

[State Subtract]  ;;  For your own value only. Life and Power manages itself.
type=varadd
trigger1=
var(1)=-
ignorehitpause=1
persistent=1

[State Below 0 or Above Max]
type=varset
trigger1=var(1)<0||var(1)>max's value
var(1)=0+(var(1)>max's value)*max's value
ignorehitpause=1
persistent=1


Have a helper or an explod+modifyexplod accorded to a float variable to resize itself accordingly. Unless you want color variances and/or flashing / you want to template it, there is absolutely no need to use a helper. Explods are better anyway because of ontop, so even if you use a helper, make it ownpal=1, it's anim blank, and the explods it owns ownpal=0, and color them with PalFX.


[State Bar Scale]
type=varset
trigger1=1
fvar(1)=(var(1)/max's value)
ignorehitpause=1
persistent=1

[State Bar]
type=explod
trigger1=!numexplod(1000)
anim=
id=1000
bindtime=-1
removetime=-1
ontop=1
ownpal=1
pos=20,220
postype=back
ignorehitpause=1
persistent=1

[State Bar]
type=modifyexplod
trigger1=numexplod(1000)
id=1000
scale=fvar(1),1  ;;  horizontal bar
scale=1,fvar(1)  ;;  vertical bar
PICK ONE
ignorehitpause=1
persistent=1

[State Bar Border]
type=explod
trigger1=!numexplod(1001)
anim=
id=1001
bindtime=-1
removetime=-1
ontop=1
ownpal=1
pos=20,220
postype=back
scale=1,1
ignorehitpause=1
persistent=1


If your bar is supposed to be bigger or smaller than it actually is in the .SFF, multiply the value of fvar(1) by it's re-scaled value.

EG — Say your bar is gradient and ""hi res"" and you want to shrink it's x axis through code to say 0.35, you'd multiply (var(1)/max's value) by 0.35.
Last Edit: June 06, 2012, 11:17:04 pm by 2OS