Grooves

From M.U.G.E.N Wiki

Jump to: navigation, search

Contents

Mode selection

(groove selection) (during intro)

Note: This is for two modes, if you wish more than two grooves, then use this code instead of the first 3 sets of code

[state 190, choose var];starts round with a random groove.  
type = VarRandom
trigger1 = time = 0
v = 4
range = 0,2; 2 can be what ever you want it to be, 2 is three grooves


[state 190]
type = varadd
trigger1 = command = "up"
v=4
vaule = ifelse(var(4)=2,-2,1);2 must be the same number as above

[state 190]
type = varadd
trigger1 = command = "down"
v=4
vaule = ifelse(var(4)=0,2,-1);this will cycle to the last groove if it is on the first groove (opposite for above)



and you will want an explod with an id specific to that explod for each extra groove you have (make sure you have a remove explod for it aswell)
[state 190, choose var];starts round with a random groove.  
type = VarRandom
trigger1 = time = 0
v = 4
range = 0,1

[state 190]
type = varset
trigger1 = command = "up"
v=4
vaule = 0

[state 190]
type = varset
trigger1 = command = "down"
v=4
vaule = 1

[State 190, Explod]
type = Explod
trigger1 = var(4)=0
trigger1 = numexplod(18)=0
anim = 137
ID = 18
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 0
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = var(4)=1
id = 17

[State 190, Explod]
type = Explod
trigger1 = var(4)=1
trigger1= numexplod(17)=0
anim = 138
ID = 17
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 0
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove


scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = var(4)=0
id = 18


example of two explodes you might want to use File:arrow.png also need to delete the variable reset at the end of the round in the common1


Adding a groove bar

Getting Ready

Several things First you will need a bg for you bar

File:Groovebarbgtest.png

You will also need a bar

File:Groovebarfilltest.png

Make sure you have a variable set aside for this

Setting up your sprites

You will want an axis in your sff for the bg to be on the middle left

File:Gbbgax.png

and for the axis on the bar itself to be on the middle left

File:Gbfax.png‎

Make sure you set up a propper animation for each of the two sprites


The actual code

In the -2 state add an explod

;this one will be used if the second groove is chosen
[state -2]
type = Explod
trigger1 = var(4)=1
trigger1= numexplod(17)=0
trigger1 = numexplod(27)=0
trigger1 = teamside=1
anim = 238                             ;lets use this animation for the grooves bg for now
ID = 27
pos = 10,220
postype =left ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
scale = 1,1
sprpriority =999
removetime=-1

;and for the bar lets use something three pixel over so it will fit 
;you will also need to lower the bar abit, lets say five pixels

[state -2]
type = Explod
trigger1 = var(4)=1
trigger1 = numexplod(27)=1
trigger1= teamside=1
anim = 338                             ;lets use this animation for the grooves fill bar for now
ID = 37
pos = 13,215
postype = left 
facing = 1
vfacing = 1
bindtime = -1
scale = 1,1
sprpriority = 9999
removetime=-1
;-----------------------------------------------------------------------------------
This section is a repeat except for the fact it will allow p2 to use the bar on his/her side
;-----------------------------------------------------------------------------------
[state -2]
type = Explod
trigger1 = var(4)=1
trigger1= numexplod(17)=0
trigger1 = numexplod(27)=0
trigger1 = teamside=2
anim = 238                             
ID = 27
pos = -10,220
postype =right ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = -1
scale = 1,1
sprpriority = 999
removetime=-1

[state -2]
type = Explod
trigger1 = var(4)=1
trigger1 = numexplod(27)=1
trigger1= teamside=2
anim = 338                             
ID = 37
pos = -13,215
postype = right 
facing = -1
vfacing = 1
bindtime = -1
scale = 1,1
sprpriority = 9999
removetime=-1
;-----------------------------------------------------------------------------------

;this is where the new variable comes in.  
[state -2]
type = varset
trigger1 = 1
fv=5
value = (100*power/const(data.power))*0.01;<<<<<Note 1>>>>>

[state -2];or 3
type = modifyexplod
trigger1 = var(4)=1
trigger1 = numexplod(27)=1
ID=37                                ;this modify's the powerbar
scale =fvar(5),1

;or combine the previous two parts and have less work for yourself to do, just put (power/3000) in place of fvar(5)


File:Fullgroove.png

Personal tools