YesNoOk
avatar

SprPriority Problem (Read 408 times)

Started by ShunpoHadouken, May 01, 2009, 02:05:15 pm
Share this topic:
SprPriority Problem
#1  May 01, 2009, 02:05:15 pm
  • **
Right Now, Im trying to learn to make a gauge using explod.
Everything is really fine but i got a problem.
Im using statedef -2.

This is my explod:
[mcode]
[State -2, Explod] ;This One Is The FILLER
type = Explod
triggerall = roundstate = 2
triggerall = Fvar(35) >= 50.0 && Fvar(35) < 100.0 || Fvar(35) >= 100.0
trigger1 = numexplod(93) = 0
anim = 93
id = 93
postype = Back
pos = Ifelse(teamside = 1,9,9),234 ;Position depending on the bar
ownpal = 1
bindtime = -1
ignorehitpause = 1
sprpriority = 9
ontop = 9
facing = 1
pausemovetime = -1
supermovetime = -1
persistent = 0

[State -2, Explod] ;This One Is The Text "POWER" That Appear in the center of the FILLER(explod 93)
type = Explod
triggerall = roundstate = 2
trigger1 = numexplod(94) = 0
anim = 94
id = 94
postype = Left
pos = Ifelse(teamside = 1,9,9),234 ;Position depending on the bar
ownpal = 1
bindtime = -1
ignorehitpause = 1
sprpriority = 999
ontop = 1
facing = 1
pausemovetime = -1
supermovetime = -1
scale = 1,1[/mcode]

The Problem Is Sometimes the text "POWER" doesnt appear at the center of the FILLER.
The FILER covering it. But I have use sprpriority and ontop = 1 to Solve the problem .
I have given the "POWER" a sprpriority of 999 and ontop = 1 to be always on top. But Doesnt work.
I really need help Please ~

Thanks A Lot.
Thanks For Any Help!!!

BC

Re: SprPriority Problem
#2  May 01, 2009, 02:22:49 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
im not sure this is valid is it?

ontop = 9


"ontop = bvalue (boolean)
    Set ontop = 1 to have the explod drawn over all other sprites and
    background layers. This parameter has precedence over sprpriority.
    Defaults to 0."



click the image to join my forum ;)
Re: SprPriority Problem
#3  May 01, 2009, 02:48:32 pm
  • **
There is no reason to use ontop AND sprpriority because if ontop=1 sprpriority will be ignored. If there are two explods having ontop=1 then the one that appears first will be in the background.

Your problem here is that the power appears earlier, I think because of the fvar triggers of the filler. You should just omit the ontop parameter and use just sprpriority, with the power explod having a higher value than the filler. (You can even let it be the value 999, the filler then has to have a value that is anything below that)

BTW ontop takes a boolean value (TRUE=anything nonzero / FALSE=zero), so it doesnt matter if you use 9, 999 or -1337, it's all the same as long as it isnt 0.
Latest Creation: SSBB Assist Trophies

BC

Re: SprPriority Problem
#4  May 01, 2009, 08:01:35 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
Quote
BTW ontop takes a boolean value (TRUE=anything nonzero / FALSE=zero), so it doesnt matter if you use 9, 999 or -1337, it's all the same as long as it isnt 0.

i see thanks for clearing that up
click the image to join my forum ;)
Re: SprPriority Problem
#5  May 02, 2009, 02:54:25 am
  • **
Oh Very thanks a lot for that, i kinda learn a new stuff today Thanks.
But if i remove the ontop and use sprpriority instead, how do i make it much more visible than the Stage's foreground Sprites?
Thanks For Any Help!!!
Re: SprPriority Problem
#6  May 02, 2009, 04:16:40 am
  • **
Well ok then you have to omit sprpriority and use ontop=1.
You just have to make sure that the power explod is generated AFTER the filler.
You can for example add a trigger like numexplod(93)>0 to your power explod, so it wont be generated unless the filler is already there.
Latest Creation: SSBB Assist Trophies
Re: SprPriority Problem
#7  May 02, 2009, 10:22:07 am
  • **
Oh.
Thank You Very Much for Help.  ;D
O-kay I'll Do It.
Thanks For Any Help!!!