collapse

Author Topic: problem with sprpriority  (Read 880 times)

0 Members and 1 Guest are viewing this topic.

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
problem with sprpriority
« on: March 17, 2015, 09:16:21 AM »
So I want have a sprpriority effect in capcom power bar I put this explod

[State 6100, Explod];˜g2P
type = Explod
trigger1 = !NumExplod(6100)
trigger1 = teamside = 2
anim = 6200+ceil(((root,var(0)&2**1)/2**1)*200)
sprpriority = 0
id = 6100
postype = Right
pos = -115,215
ownpal = 1
bindtime = -1
ignorehitpause = 1
ontop = 1
facing = 1
pausemovetime = -1
supermovetime = -1
scale = ifelse(!((root,var(0)&2**1)/2**1),1,1),ifelse(!((root,var(0)&2**1)/2**1),1,1)



[State 6100, Explod];ƒQ[ƒWMAX
type = Explod
trigger1 = !NumExplod(6105)
anim = 6108
id = 6105
sprpriority = 5
postype = Back
pos = 84,215
ownpal = 1
bindtime = -1
ignorehitpause = 1
ontop = 1
removetime = -1
pausemovetime = -1
supermovetime = -1
scale = 1,1

[State 6100, ModifyExplod]
type = ModifyExplod
triggerall = power >= 2000
trigger1 = NumExplod(6105)
ID = 6105
scale = 1,1
ignorehitpause = 1

[State 6100, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(6105)
trigger1 = power < 2000
trigger2 = NumHelper(9000)||((root,var(0)&2**20)&&enemynear,NumHelper(9000))||root,fvar(20)
trigger3 = root,var(13)
ID = 6105
scale = 0,0
ignorehitpause = 1


[State 6100, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(6100)
ID = 6100
scale = ifelse(!((root,var(0)&2**1)/2**1),1,1),ifelse(!((root,var(0)&2**1)/2**1),1,1)
ignorehitpause = 1

[State 6100, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(6100)
trigger1 = NumHelper(9000)||((root,var(0)&2**20)&&enemynear,NumHelper(9000))||root,fvar(20)
trigger2 = root,var(13)
ID = 6100
scale = 0,0
ignorehitpause = 1

but sprpriority doesn't work



Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: problem with sprpriority
« Reply #1 on: March 18, 2015, 12:49:11 AM »
You have ontop = 1 in both of those. That basically means infinite sprpriority and will be above everything. ontop = 1 is ordered by last explod created. If you want sprpriority to take effect, set ontop = 0. This may mean things won't actually overlap the power bars if that's the effect you were after as those are classed as a layer 1 object.

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
Re: problem with sprpriority
« Reply #2 on: March 18, 2015, 06:44:06 AM »
It works! Now I removed ontop the trigger sprpriority works fine thanks again dude you are great  =D>

Exuse just another question: I'm working on cvs pro chars so they have two grooves with two different power bar. in snk groove power has autocharged but when I want charge the bar the inner bar goes over the edges of power  bar being an irregular shape: I tried to scale the sprite with modifyexplod but I didn't have the desired effect I put the code

[State 6130, Explod]
type = Explod
triggerall = !NumExplod(6134) ;add this
triggerall = root,Alive ;add this
trigger1 = root,life<300 ;change this to something easier ;(100*root,life/root,const(data.life))<=30
trigger1 = teamside = 1
anim =  6134
ID = 6134
pos = 140,26
postype = back
facing = -1
vfacing = 1
bindtime = -1
pausemovetime = -1
removetime = -1   ;add this
scale = 1,1
sprpriority = 1
ontop = 1
ownpal = 0
ignorehitpause =  1
supermovetime = -1
pausemovetime = -1



[State 6130, Explod]
type = Explod
triggerall = !NumExplod(6134) ;add this
triggerall = root,Alive ;add this
trigger1 = root,life<300 ;change this to something easier ;(100*root,life/root,const(data.life))<=30
trigger1 = teamside = 2
anim =  6134
ID = 6134
pos = 177,26
postype = left
facing = 1
vfacing = 1
bindtime = -1
pausemovetime = -1
removetime = -1   ;add this
scale = 1,1
sprpriority = 1
ontop = 1
ownpal = 0
ignorehitpause =  1
supermovetime = -1
pausemovetime = -1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(6134) ;add this
trigger1 = teamside = 1
;anim = 6134
ID = 6134
postype = back
pos = 140,26  ;add this
facing = -1
vfacing = 1
bindtime = -1
pausemovetime = -1
removetime = -1   ;add this
scale = (root,life)/300.0,1 ;scale will adjust based on life;((root,life<=1)/(root,lifeMax= 30), .5
sprpriority = 1
ontop = 1
ownpal = 0
ignorehitpause =  1
supermovetime = -1
pausemovetime = -1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(6134) ;add this
trigger1 = teamside = 2
;anim = 6134
ID = 6134
postype = left
pos = 177,26  ;add this
facing = 1
vfacing = 1
bindtime = -1
pausemovetime = -1
removetime = -1   ;add this
scale = (root,life)/300.0,1 ;scale will adjust based on life;((root,life<=1)/(root,lifeMax= 30), .5
sprpriority = 1
ontop = 1
ownpal = 0
ignorehitpause =  1
supermovetime = -1
pausemovetime = -1

[State 0, RemoveExplod] ;add this controller to remove the explod when character's KO
type = RemoveExplod
trigger1 = root,Alive=0
id = 6134

[State 6130, Explod];”wŒi
type = Explod
trigger1 = !NumExplod(6583)
trigger1 = teamside = 1
anim = 6583
id = 6583
postype = Back
pos = 19,39
ownpal = 1
bindtime = -1
ignorehitpause = 1
ontop = 1
pausemovetime = -1
supermovetime = -1

[State 6130, Explod];”wŒi
type = Explod
trigger1 = !NumExplod(6585)
trigger1 = teamside = 2
anim = 6585
id = 6585
postype = Back
pos = 46,39
ownpal = 1
bindtime = -1
ignorehitpause = 1
ontop = 1
pausemovetime = -1
supermovetime = -1

[State 6130, Explod];”wŒi
type = Explod
trigger1 = !NumExplod(6131)
anim = 6131
id = 6131
postype = Back
pos = 115,217
ownpal = 1
bindtime = -1
ignorehitpause = 1
ontop = 1
pausemovetime = -1
supermovetime = -1


[State 6130, Explod];ƒQ[ƒW   ; This is the explod of inner bar
type = Explod
trigger1 = !NumExplod(6132)
anim = 6132
id = 6132
postype = Back
pos = 114,215
ownpal = 1
bindtime = -1
ignorehitpause = 1
ontop = 1
pausemovetime = -1
supermovetime = -1



[State 6130, Explod];˜g1P
type = Explod
trigger1 = !NumExplod(6130)
trigger1 = teamside = 1
anim = 6130+ceil(((root,var(0)&2**1)/2**1)*200)
id = 6130
postype = Left
pos = 115,215
ownpal = 0
bindtime = -1
ignorehitpause = 1
ontop = 1
facing = 1
pausemovetime = -1
supermovetime = -1
scale = ifelse(!((root,var(0)&2**1)/2**1),1,1),ifelse(!((root,var(0)&2**1)/2**1),1,1)

[State 6130, Explod];˜g2P
type = Explod
trigger1 = !NumExplod(6130)
trigger1 = teamside = 2
anim = 6230+ceil(((root,var(0)&2**1)/2**1)*200)
id = 6130
postype = Right
pos = -115,215
ownpal = 0
bindtime = -1
ignorehitpause = 1
ontop = 1
facing = 1
pausemovetime = -1
supermovetime = -1
scale = ifelse(!((root,var(0)&2**1)/2**1),1,1),ifelse(!((root,var(0)&2**1)/2**1),1,1)

[State 6130, Explod];MAX
type = Explod
trigger1 = !NumExplod(6133)
anim = 6133+ceil(((root,var(0)&2**1)/2**1)*200)
id = 6133
postype = Back
pos = 20,202
ownpal = 1
bindtime = -1
ignorehitpause = 1
ontop = 1
facing = 1
pausemovetime = -1
supermovetime = -1
removetime = -1
scale = ifelse(!((root,var(0)&2**1)/2**1),1,1),ifelse(!((root,var(0)&2**1)/2**1),1,1)

[State 6130, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(6130)
ID = 6130
scale = ifelse(!((root,var(0)&2**1)/2**1),1,1),ifelse(!((root,var(0)&2**1)/2**1),1,1)
ignorehitpause = 1

[State 6130, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(6130)
trigger1 = NumHelper(9000)||((root,var(0)&2**20)&&enemynear,NumHelper(9000))||root,fvar(20)
trigger2 = root,var(13)
ID = 6130
scale = 0,0
ignorehitpause = 1

[State 6130, ModifyExplod]
type = ModifyExplod
trigger1 = NumExplod(6131)
ID = 6131
scale = 1,1
ignorehitpause = 1

[State 6130, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(6131)
trigger1 = NumHelper(9000)||((root,var(0)&2**20)&&enemynear,NumHelper(9000))||root,fvar(20)
trigger2 = root,var(13)
ID = 6131
scale = 0,0
ignorehitpause = 1

[State 6130, ModifyExplod]
type = ModifyExplod
triggerall = !root,var(14)
trigger1 = NumExplod(6132)
trigger1 = power = [0,949]
ID = 6132
scale = ifelse(power>=1000,1,power)/1000.0,.83
ignorehitpause = 1

[State 6130, ModifyExplod]                            ; This is the state of inner bar i talked first
type = ModifyExplod
triggerall = !root,var(14)
trigger1 = NumExplod(6132)
trigger1 = power = [950,1000]                     
ID = 6132
scale = ifelse(power>=1000,1,power)/1000.0,1
ignorehitpause = 1

[State 6130, ModifyExplod]
type = ModifyExplod
triggerall = root,var(14)

trigger1 = NumExplod(6132)
ID = 6132
scale = (root,var(14))/750.0,.83
ignorehitpause = 1



[State 6130, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(6132)
trigger1 = NumHelper(9000)||((root,var(0)&2**20)&&enemynear,NumHelper(9000))||root,fvar(20)
trigger2 = root,var(13)
ID = 6132
scale = 0,0
ignorehitpause = 1



[State 6130, ModifyExplod]
type = ModifyExplod
triggerall = root,var(14)
trigger1 = NumExplod(6133)
ID = 6133
scale = 1,1
ignorehitpause = 1

[State 6130, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(6133)
trigger1 = !root,var(14)
trigger2 = NumHelper(9000)||((root,var(0)&2**20)&&enemynear,NumHelper(9000))||root,fvar(20)
trigger3 = root,var(13)
ID = 6133
scale = 0,0
ignorehitpause = 1
« Last Edit: March 18, 2015, 07:27:15 AM by Demongorne »

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: problem with sprpriority
« Reply #3 on: March 21, 2015, 02:09:37 AM »
Rather than trying to fathom that. Can you take a screenshot of what is currently happening? I mean, i'm sure it's fixable if the bar is a uniform shape.

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
Re: problem with sprpriority
« Reply #4 on: March 21, 2015, 06:24:06 AM »
ok   

as you can see the bar has an irregular shape and goes over the power bar edges

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: problem with sprpriority
« Reply #5 on: March 21, 2015, 07:17:50 AM »
You can't do it with modification. Modification makes a small sprite larger. If it's a shape like that, you still need the original bit of the bar in place. The lifebars work completely differently. For those mugen actually strips off pixels rather than scaling it.

Your only option if you want to use a bar like that is to screenshot it, pixel by pixel and assemble an animation. The helper then constantly changeanims to a specific animelem dependant on a variable rather than powerlevel. You could use powerlevel, but you'll need more math because that bar won't be 1000/3000/100 or any sensible number in length unless you're lucky. Basically the bar will display elem = var(4) or whatever over and over. And var(4) will change based on your moves hitting. You need to redo all your code.

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[Today at 11:31:36 AM]


Rooftop Skyline(1.1 Only/AIGS) by Vegaz by LightFlare
[October 21, 2024, 12:13:37 PM]


Secluded Base(1.1 Only/AIGS) by Vegaz by LightFlare
[October 17, 2024, 01:21:06 PM]


Ultimate Balrog + stage by ELECTRO
[October 17, 2024, 05:40:31 AM]


Eternal Lament Stage 1.1 & 1.0 by MatreroG
[October 11, 2024, 05:03:17 PM]


Classic VS : Balrog by ELECTRO
[October 08, 2024, 04:35:53 PM]


IMT Tutorials and Documentation gone? by tehdevil
[October 06, 2024, 04:25:52 AM]


Justice League Themyscira Stage by Vegaz by LightFlare
[October 04, 2024, 08:23:57 AM]


D2TD VS Showcase Thread by D2TD
[September 30, 2024, 12:29:35 AM]


Mugen Of Solitude:Spacestation 1.0 Updated Stage By Supaman2525 & OldGamer by Aumio Khan
[September 29, 2024, 09:12:20 AM]

* IMT Calendar

October 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 [31]

SimplePortal 2.3.5 © 2008-2012, SimplePortal