Sprpriority issue

Started by Lord Mike, September 12, 2010, 10:11:04 PM

Previous topic - Next topic

Lord Mike

This is something i've avoided messing with for quite some time, but it kinda bugs me for 2 days.
I use for all my chars 2 gauges positioned above the floor.
One indicates the boost, the other indicates the power.
But there are certain stages that contain objects on the floor that overlap these gauges.
So naturaly i've tried to use the ontop function, since these are explods. But upon using it, it messes up their sprpriority.
The boost bar consists in 4 elements:
-the actual boost bar that has the highest sprpriority (7)
-a grid that had the lowest priority (3)
-the 3 levels of boost represented by 3 colored bars (pink, yellow and green) with medium sprpriority (4 when incomplete, 5 when complete)
-and a flashing animation that has sprpriority a little higher than the 3 levels of boost. (6)
When i go and use ontop=1 it messes up everything.
Sometimes the color bars will be on top of everything, other times the grid will be on top of everything, other times the animation.
Is there a way to use ontop=1 without messing the sprpriority up?
Maybe if i put the explods in a certain order in the *.cns file? Although i've tried that and couldn't find the correct order...

Any ideas are greatly appreciated...
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。

Lord Mike

#1
Uhm, i've managed to get the explods with sprpriority 7 and 3 like they should.
But those with sprpriority 4,5 and 6 are still on top of them no matter what order i add them in...
The order i have them in my cns file is the following:
anim 4100 - sprpriority 7
anim 4101 - sprpriority 3
anim 4115 - sprpriority 4
anim 4110,4111,4112 - sprpriority 5
anim 7190 - sprpriority 6

With this order i have anim 4100 on top of anim 4101, but anim 4110-4115 are on top of them. And anim 7190 is on top of everything now.
I've tried different sprpriorties for them, but with no effect.
Help, please?
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。

Cyanide

Ontop does not work with sprpriority. It just draws it ontop of whatever elements are in place.

Basically you need to spawn your explods in a bottom - top order to even come close.

back
mid
front


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Lord Mike

Thanks. It worked for all the explods and got them in the order i wanted to have them, except for the animated one (7190) which remains on top of everything no mater where i place it.
I take it this is was a delicate issue i was attempting at?
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。

Cyanide

I assume the one that keeps showin on top of everything is the one that's scaling? By altering it it'll reassert it's priority. You'll need to mod the one that should be on top as well at the same time. Nothing special really, just run it again.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Lord Mike

I'm sorry but i couldn't understand where you are getting at...

This is the explod that should be on top of everything:
[state -2,a];ƒQ[ƒW˜g
type = Explod
trigger1 = Facing = 1
trigger1 = numexplod(4100) = 0
anim = 4100
id = 4100
postype = left
bindtime = -1
pos = 65,225
sprpriority = 7
ontop = 1;==Changed
ownpal = 1
scale = 0.5,0.5


[state -2,a];ƒQ[ƒW˜g
type = Explod
trigger1 = Facing = -1
trigger1 = numexplod(4100) = 0
anim = 4101
id = 4100
postype = right
bindtime = -1
pos = -65,225
sprpriority = 7
ontop = 1;==Changed
ownpal = 1
scale = 0.5,0.5
facing = -1

And this is the animated explod that shows ontop of everything after i've added ontop=1.

;----------------------Boost Gauge effect 1'------------------------
[state ]
type=explod
trigger1=!numexplod(7190)
trigger1=teamside=1
trigger1=!root,fvar(20)&&(roundstate||root,time>1)
trigger1=var(16)>=100;root,fvar(2)>=185
trigger1=gametime%50=0
id=7190;level 1 of boost
anim=7190
postype=left
pos=8,213
scale=.5,.8
sprpriority=6
bindtime=-1
removetime=-2
ownpal=1
ontop=1
trans=add
supermovetime=999999999
pausemovetime=999999999
[state ]
type=explod
trigger1=!numexplod(7190)
trigger1=teamside=2
trigger1=!root,fvar(20)&&(roundstate||root,time>1)
trigger1=var(16)>=100;root,fvar(2)>=185
trigger1=gametime%50=0
id=7190
anim=7190
postype=right
pos=-7,213
facing=-1
scale=.5,.8
sprpriority=6
bindtime=-1
removetime=-2
ownpal=1
ontop=1
trans=add
supermovetime=999999999
pausemovetime=999999999
[state ]
type=removeexplod
trigger1=power<1000
id=7290
[state ]
type=explod
trigger1=!numexplod(7191)
trigger1=teamside=1
trigger1=!root,fvar(20)&&(roundstate||root,time>1)
trigger1=var(16)>=200;root,fvar(2)>=370
trigger1=gametime%50=11
id=7191;level 2 of boost
anim=7191
postype=left
pos=49,213
scale=.5,.8
sprpriority=6
bindtime=-1
removetime=-2
ownpal=1
ontop=1
trans=add
supermovetime=999999999
pausemovetime=999999999
[state ]
type=explod
trigger1=!numexplod(7191)
trigger1=teamside=2
trigger1=!root,fvar(20)&&(roundstate||root,time>1)
trigger1=var(16)>=200;root,fvar(2)>=370
trigger1=gametime%50=11
id=7191
anim=7191
postype=right
pos=-49,213
facing=-1
scale=.5,.8
sprpriority=6
bindtime=-1
removetime=-2
ownpal=1
ontop=1
trans=add
supermovetime=999999999
pausemovetime=999999999
[state ]
type=explod
trigger1=!numexplod(7192)
trigger1=teamside=1
trigger1=!root,fvar(20)&&(roundstate||root,time>1)
trigger1=var(16)>=200;root,fvar(2)>=555
trigger1=gametime%50=22
id=7192;level 3 of boost
anim=7191
postype=left
pos=86,213
scale=.5,.8
sprpriority=6
bindtime=-1
removetime=-2
ownpal=1
ontop=1
trans=add
supermovetime=999999999
pausemovetime=999999999
[state ]
type=explod
trigger1=!numexplod(7192)
trigger1=teamside=2
trigger1=!root,fvar(20)&&(roundstate||root,time>1)
trigger1=var(16)>=300;root,fvar(2)>=555
trigger1=gametime%50=22
id=7192
anim=7191
postype=right
pos=-86,213
facing=-1
scale=.5,.8
sprpriority=6
bindtime=-1
removetime=-2
ownpal=1
ontop=1
trans=add
supermovetime=999999999
pausemovetime=999999999
[state ]
type=removeexplod
trigger1=var(16)<100;root,fvar(2)<185
id=7190
[state ]
type=removeexplod
trigger1=var(16)<200;root,fvar(2)<370
id=7191
[state ]
type=removeexplod
trigger1=var(16)<300;root,fvar(2)<555
id=7192
This part of code only works under [Statedef -2].

You said altering it. May i ask how?
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。

Cyanide

I thought you were scaling. Are you recreating that explod every tick? If you are then you'll need to do the one on top every time that one is respawned. Like i say, the last ontop explod created will be ontop of everything else. So every time those explods are created they reassert their priority.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Lord Mike

#7
Hello.
I have one more question regarding the sprpriority:
-is there a way to make the lifebar be on top of a supermoves' background?
I know how to make a superBG go behind it, by making it from an explod into a helper with flags noBG, noFG, but can i actually make the lifebar be on top without transforming an explod into a helper in my chars?



There, above the 100 strikes is located the lifebar, but it is missing while that BG is displayed. I've tried lowering the superBG's sprpriority and it gets me nowhere...
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。

Cyanide

If that's the case it's a lifebar problem. Some people don't set them to layer 1 which means they're just not on top and are classed as a BG element rather than an FG one.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.