Steel Komodo's Dumb Noob Questions

Started by Steel Komodo, January 01, 2016, 10:36:20 PM

Previous topic - Next topic

Steel Komodo

You may remember this topic was one asking for help about Focus Attacks. Well, I decided to change it, because I have a new issue and I thought changing this topic would be easier than posting a new one :U

Basically, I have my gethit sounds loaded into the character, and I want them to play when the character is hit. The thing is, I also only want certain sounds to play when certain strengths of attack hit - so the character makes different sounds from heavy gethits than light gethits. I've tried looking around for some tutorials to help out, but everything is just for playing general hitsounds, and that's not what I want. Can somebody enlighten me on how to make this work? Because I'm scratching my head something fierce over it.

Thanks in advance to whoever provides the answer!

Steel Komodo

Sorry to bump this, but now I am having further problems. Namely, with implementing EX Moves.

I've been trying since forever to get CvW Mario to have an EX Fireball, among other moves. What's so frustrating is that I have all the commands set up, all the states and everything, and there's nothing wrong with it that I can see. But no matter what I do, nothing seems to work at all. The move simply won't come out no matter what I do. In fact, this is a problem I've been having with pretty much anything that requires pushing two buttons, and I'm getting really frustrated by it since I can't seem to figure out what could possibly be wrong.

Here's the commands and code for the move, for anyone who's better at this than I am:

Spoiler: Command and Code for EX Fireball (click to show)
[command]
name = "ex fireball"
command = ~D,DF,F,x+y
time = 15

[State -1, EX Fireball]
type = ChangeState
value = 1002
triggerall = command = "ex fireball"
triggerall = power >= 500
triggerall = numproj = 0
trigger1 = statetype = s && ctrl
trigger2 = stateno = 245 && movecontact
trigger3 = stateno = 201 && movecontact
trigger4 = stateno = 200 && movecontact
trigger5 = stateno = 210 && movecontact
trigger6 = stateno = 230 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 400 && movecontact
trigger9 = stateno = 410 && movecontact
trigger10 = stateno = 430 && movecontact
trigger11 = stateno = 441 && movecontact
trigger12 = stateno = 205 && movecontact
trigger13 = stateno = 211 && movecontact
trigger14 = stateno = 235 && movecontact
trigger15 = stateno = 435 && movecontact


;-----------------------
;EX Fireball
[StateDef 1002]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1002
poweradd = -500

;Generated by Fighter Factory PalFX Editor
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 2
add = 140,140,40
mul = 256,256,256
sinadd = 100,100,100,3
invertall = 1
color = 0
ignorehitpause = 0
;persistent = 1

[State 1220, Afterimage]
type = AfterImage
trigger1 = animelem = 1
length = 13
PalBright   =  30, 30, 30
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 25


[State 0, Width]
type = Width
trigger1 = 1
edge = 0,0
player = 15,0
;value = 0,0
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S55,2
volume = 255
channel = 0
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S45,6
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =


[State 1002, 1]
type = Projectile
trigger1 = AnimElem = 6
projanim = 1100
projhitanim = 1101
projid = 1001
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
projshadow = 0
offset = 33,0
projscale = 1, 1
velocity = 5, 0
attr = S, SP
damage   = 64,8
animtype = heavy
guardflag = MA
hitflag = MAFP
pausetime = 10,10
hitsound   = S45,7
sparkxy = 500,500
guardsound = S6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -5
air.animtype = Back
air.velocity = -5,-5
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 14
down.bounce = 0
fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 3

[State 1002, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

A quick reply would be appreciated - I really want to have a beta of Mario released soon-ish, so I can get feedback on what to fix/change.

-Whiplash-

Is the ex fireball above the normal fireball in the command?

More complicated moves that have similar commands need to above others in the cmd file or they won't activate.

Steel Komodo

Just tried that, and it works! Thanks!

I'll keep this thread open, for if I have any more stupid questions that can easily be answered. Expect possibly more of those from me in the future :P

Steel Komodo

#4
Okay, so I got this feedback for CvtW Mario, concerning his cape move:

Quote from: Wesley on January 25, 2016, 02:04:53 AM


Missing Anim debug message. ChangeAnim is used in a custom state instead of ChangeAnim2.

Can somebody clarify this for me? I was mostly using the standards of Capcom vs. the World for custom states, so I'm not entirely sure how to apply this behaviour outside of a full game.

Here's the code I used for the Cape, along with the custom state:

Spoiler (click to show)
;-----------------------
;Magic Cape
[StateDef 990]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 2300
poweradd = 0
sprpriority = 2

;[State 0, VarAdd]
;type = VarAdd
;trigger1 = animelem = 2
;v = 37
;value = -2

[state 990, white flash]
type = PalFx
trigger1 = time = 1
sinadd = 128,128,128,16
time = 8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S0,4
volume = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 990, Wall]
type = Helper
trigger1 = animelem = 6
trigger1 = stateno = 990
helpertype = normal
name = "Cape Projectile Helper"
ID = 995
stateno = 995
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
ownpal = 1
supermovetime = 99999
pausemovetime = 99999
size.xscale = 1
size.yscale = 1

[State 990, 1]
type = HitDef
triggerall = enemy,pos y >= 0
trigger1 = AnimElem = 6
attr = S, SA
damage = 75
animtype = heavy
hitflag = MAF
Guardflag = MA
priority = 3, Hit
pausetime = 1, 25
guard.pausetime = 15,15
sparkno = 3
sparkxy = -10, -42
hitsound = s5, 3
guardsound = s6, 0
ground.type = High
ground.slidetime = 18
ground.hittime  = 20
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 18
p2stateno = 13579

[State 990, 1]
type = HitDef
triggerall = enemy,pos y < 0
trigger1 = AnimElem = 6
attr = S, SA
damage = 75
animtype = heavy
hitflag = MAF
Guardflag = MA
priority = 3, Hit
pausetime = 1, 25
guard.pausetime = 15,15
sparkno = 3
sparkxy = -10, -76
hitsound = s5, 5
guardsound = s6, 0
ground.type = High
ground.slidetime = 18
ground.hittime  = 20
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -4,-4
air.hittime = 18
envshake.time = 25
envshake.ampl = 4
fall = 1
fall.recover = 0

[State 990, end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;--------------------------------------------------------
;Cape Projectile Helper
[Statedef 995]
type    = S
movetype= A
physics = S
juggle  = 0
anim = 10050
sprpriority = -2

[State 995, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 995, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 995, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AP
time = 1
ignorehitpause = 1
persistent = 1

[State 995, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1

[State 995, hitoverride] ;Loops until parent state is finished
type=hitoverride
trigger1=1
time=-1
attr=SCA,AP
forceair = 1
stateno=995

[State 995, DestroySelf] ;Parent state finished
type = DestroySelf
trigger1 = parent,stateno !=990

;------------------------
;Cape Hit
[StateDef 13579]
type = S
movetype= H
physics = S
anim = 13579
ctrl = 0
poweradd = 0
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = -5
;ignorehitpause =
;persistent =

[State 13579, end]
type = SelfState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

Cyanide

By using the anim line in the custom state you are telling your opponent to use their own air file. It may not have the anim you suggest, or if it does, it may have an effect there instead.

You leave that line out in a custom state unless it is an anim you KNOW the enemy will have, like 0, or 5000.

If you have created a custom get hit animation, you use changeanim2. It sends p2 into your .air file for the information. However you must use the required sprites for this animation or the character will turn invisible when he does not have the required frames.


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.

Steel Komodo

Okay, I think I understand that much. So where would I put the ChangeAnim2? I tried putting it in the definitions for the actual move, but that comes up with more errors. And nothing seems to happen when I put it in the hit state. Is there something I'm doing wrong?

Cyanide

You create the animation in your .air as it seems you have done.

You would then put in the custom hitstate

[State Changeanim2]
type = changeanim2
trigger1 = time = 0
value = your animation

If nothing is happening after that, different issues are occuring. Although looking at the error you're getting, the above should at least remove that error.


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.

Odb718

Not trying to derail the thread, but editing threads causes confusion. Reading the thread I thought the focus attack was the current problem and not the animation change.

To add to Cyanide's answer you can use Mugen Class for a lot of answers.
For these problems, look into ChangeAnim
But SelfAnim is something you'd want to look into. It can add a lot of compatibility if you use Optional Animations as a base.
vVv Gouken718 vVv SabreTooth718 vVv


Cyanide

changeanim is not his issue as he is receiving a debug error when he enters the opponent into a custom state. selfanimexist will also not resolve this as you use that only to provide access to a default animation if the one you need is not available.

For example, If midnight bliss is anim 91234, but the opponent doesn't have it, you need a seperate animation for if they lack that one

trigger1 = selfanimexist(91234) = 0
value = default anim when midnight bliss isn't there.

You would use changeanim for midnight bliss, not for the default.


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.

Steel Komodo

#10
EDIT: Disregard that, I got it to work. Many thanks! :)

Steel Komodo

Okay, so I'm working on a Rage Mode for one of my characters, and I'm unsure as of how to properly code it in. I have a basic idea of what I want, but I'm not very good at translating it into code. Here's my plan for it:

  • At low life, when the player inputs the command, I have a variable (Var30) set to 1 in the move state. This turns on Rage Mode and is shown as a PalFX on the character, along with whatever else I want the move to do, which are placed in State -2.
  • I also have a variable (Var31)turn on in State -2. to ensure that the move can't be used again afterwards. This prevents Rage Mode being spammed.
  • After 10 seconds, I want Rage Mode to turn off.

The problem I have is in adding the time limit. I tried using varadd to turn off Var30 after 600 frames, but this only works when the character is standing - every time he moves or does an attack, it resets the timer. I also tried a method that sets Var30 to a value equiavelent to 10 and have it tick down every second, but that didn't work either. Can someone point me to a method that would help me out here?

inktrebuchet

I believe this will work for you. Try this trigger for your Var(30).

trigger1 = gametime%(60 * 10) = 0 ; 60 = 1sec

altoiddealer

Quote from: Steel Komodo on March 29, 2017, 05:24:23 PM
  • I also have a variable (Var31)turn on in State -2. to ensure that the move can't be used again afterwards. This prevents Rage Mode being spammed.
Sounds like var(1) is being set from State -1 (commands), correct?
You can just include the trigger: triggerall = var(1) = 0
No need for a second var.

Quote from: Steel Komodo on March 29, 2017, 05:24:23 PMThe problem I have is in adding the time limit. I tried using varadd to turn off Var30 after 600 frames, but this only works when the character is standing - every time he moves or does an attack, it resets the timer. I also tried a method that sets Var30 to a value equiavelent to 10 and have it tick down every second, but that didn't work either. Can someone point me to a method that would help me out here?
In State -2, include something like this:
[State -2, Clock thing]
type = Explod
trigger1 = var(1) = 1
trigger1 = !numexplod(1111) ;prevent multiple instances
removetime = 600
id = 1111
anim = 9999 ;*****use a completely blank anim*****

[State -2, switch off rage mode]
type = VarSet
trigger1 = !numexplod(1111)
var(1) = 0


Steel Komodo

#14
So I just tried the method ink posted, and whilst that kind of works, it's nowhere near 10 seconds long, for some reason. Is there something I'm missing here?

Here's the code I've got, for people to understand.

Spoiler: WARNING; LONG! (click to show)
;This is the command for the Rage Mode.]
[State -1, Rage Mode]
type = ChangeState
value = 3000
triggerall = command = "Rage Mode"
triggerall = life <= 250 && var(31) = 0 ;When this becomes 1, the command cannot be performed.
trigger1 = (statetype != A) && ctrl


;State 3000: Rage Mode
[Statedef 3000]
type = S
ctrl = 0
anim = 3000
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 3000, superpause]
type = superpause
trigger1 = !Time
time = 126
movetime = 126
anim = -1
p2defmul = 1
darken = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S46,0
volumescale = 255
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, VarSet] ;The Rage Mode Variable.
type = VarSet
trigger1 = time = 0
v = 30    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 0, VarAdd]; This activates Rage Mode on Frame 15.
type = VarAdd
trigger1 = animelem = 15
v = 30    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 0, VarSet] ;The variable that shuts off the Rage Mode command.
type = VarSet
trigger1 = animelem = 15
v = 31    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 15
time = 14
freq = 125
ampl = -8
;phase = 90
;ignorehitpause =
;persistent =

[State 3000, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;State -2
[State 0, Rage Mode FX]
type = PalFX
triggerall = var(30) = 1
trigger1 = 1
time = 1
add = 50+ceil(sin(gametime/3.0*pi)*32), 10+ceil(sin(gametime/3.0*pi)*32), 10+ceil(sin(gametime/3.0*pi)*32)
mul = 256,256,256
invertall = 0
color = 256
ignorehitpause = 1

[State 0, VarAdd] ;Turns off Rage Mode after 10 seconds
type = VarAdd
trigger1 = gametime%(60*10) = 0
v = 30    ;fv = 10
value = -1
;ignorehitpause =
;persistent =

UPDATE: Well, apparently Mugen's gametime trigger thing is fucked. I can activate it at the start of a test match and it works fine, but any time after 85 on the clock and it doesn't even last three. Guess I'm going to have to think of something else...

altoiddealer

Scrap the VarAdd thing and try my blank Explod detection.  It will work.


Steel Komodo

#16
Quote from: altoiddealer on March 29, 2017, 09:49:51 PM
Scrap the VarAdd thing and try my blank Explod detection.  It will work.

Well, that's the thing - I also tried that, but Rage Mode just plain refused to activate. I'll try that, but right now I'm just considering scrapping it altogether.

EDIT: Nope, doesn't work. Aaaargh, I'm tearing my hair out here, because I'm sure the answer is right in front of me, and yet I can't see it! I'm not sure what else to do now, save for just scrapping the feature.

Cyanide

Wow, way too complicated for a simple timer. Short form

You want to activate a move. The power up needs to last 10 seconds. It cannot be used again after that period? Should it be usable next match? You only need 1 variable although you can continue with 2 if you like.

I don't know what you USE this for as i'm not seeing any examples but here is how to mod your code so it behaves.

[State 0, VarAdd]; This activates Rage Mode on Frame 15.
type = VarAdd
trigger1 = animelem = 15
v = 30    ;fv = 10
value = 600

    ;State -2
    [State 0, Rage Mode FX]
    type = PalFX
    triggerall = var(30) > 0
    trigger1 = 1
    time = 1
    add = 50+ceil(sin(gametime/3.0*pi)*32), 10+ceil(sin(gametime/3.0*pi)*32), 10+ceil(sin(gametime/3.0*pi)*32)
    mul = 256,256,256
    invertall = 0
    color = 256
    ignorehitpause = 1
     
    [State 0, VarAdd] ;Turns off Rage Mode after 10 seconds
    type = VarAdd
    trigger1 = var(30) > 0
    v = 30    ;fv = 10
    value = -1
    ignorehitpause = 1


If you wanted to use 1 variable you would disallow the command if var(30) was greater than 0 and simply count it upwards. When it hits 600 it is "off" at that point. You may find a seperate var easier to use but it's not strictly needed for this


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.

Steel Komodo

Tried Cyanide's code and it works just fine. Thanks a bunch, man! :)

I'll probably put up a preview video showing what Rage Mode does... when I'm not being lazy, that is.

Steel Komodo

#19
Alright, new problem. I'm coding Ryu's Ultra Combo, and I want it to transition into the Shin Shoryuken if it hits at the last few active frames. I kawaii  much have all the code set up for the Shin Shoryuken itself, but I don't know how specifically to transition into it. What do I need to do?

EDIT: Never mind, I got it to work!