YesNoOk
avatar

TB LUCARIO LASER questions (Read 2181 times)

Started by Tyrannosaurus rex, May 17, 2017, 10:23:39 pm
Share this topic:
TB LUCARIO LASER questions
#1  May 17, 2017, 10:23:39 pm
  • **
  • I'm a llama!
I have a query regarding the Super Auro Storm attack [Statedef 2100] done by TB's Lucario:

http://mugenguild.com/forum/topics/lucario-143719.0.html

It looks so smooth and effective, yet the most important feature that caught my attention most were the invisible helpers (Air Super Aura Storm (Helper Hit)) doing the actual damage behind the beam. I noticed that they too, can have their angles and direction adjusted directly by player's input commands if this piece of code is added in their statedef:

[State 2104, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = Root,Var(1)
Scale = 1.0 / CameraZoom, 1


That in conjunction with providing sprites to the invisible hit actors, made the large intermediate beam visual redundant and I simply wish to remake this with redirecting the hit helpers to be spawned directly from the player when he executes that attack.

I have two issues though with trying to make use of this for my own purposes. The first are the variables v(1) and v(2). I'm sure variable 1 is a new variable declared right in the attack with the varadd state, but where was variable 2 declared? I tried looking for it and found nothing in the other CNS files. Just sysv(2), which I'm sure is not the same thing. Searching for the origins of variable 2 became a real pain so I decided to contact the creator. Unfortunately, Mr. Thunderbird has not been around to contact since two months. Needless to say, I tried my best in transferring the whole attack into simpler characters on trial and error basis but Mugen's becomes a real Pain, when it keeps spitting out errors and with arbitrary messages like "error in parsing state angledraw..." . Is there no way to track where variables are declared and root them out?

The second issue is regarding how many helpers I can be allowed to use to make a convincing beam attack that can last for a few seconds more than that special attack. I was told in a previous thread that making too many helpers on screen would cause visual glitches to occur and the fighting in itself to become prone to lag and what not. However, If I go back to using sctrl projectiles, I lose the ease of controls offered by helpers such as removing them on the fly, controlling their angles, making interesting beam locks and a whole lot of other effects not possible with them.

Its really difficult in Mugen itself, so I'm not going to try imagining how hard it would be to implement in IKEMAN. Any help would be greatly appreciated

Thank you in advance
T-rex
Re: TB LUCARIO LASER questions
#2  May 19, 2017, 07:49:39 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It would probably help if we knew what that looked like without having to DL the character. If it's redirectable on the fly and how that behaves. Right now i'd have to waste time downloading something i don't actually want to find out what you're talking about.


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.
Re: TB LUCARIO LASER questions
#3  May 19, 2017, 09:05:16 pm
  • **
  • I'm a llama!
Alright, I'll explain. Here is the code actually used in Lucario:

Code:
[Statedef 2000]
Type = S
MoveType = A
Physics = S
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 2000
PowerAdd = -2000
SprPriority = 2

[State 2000, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA,AA,AP,AT
Time = 1
IgnoreHitPause = 1

[State 2000, Helper]
Type = Helper
Trigger1 = Time = 0
Name = "Super Helper"
ID = 6000
StateNO = 6000
Pos = 0,0
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
SuperMoveTime = 216000

[State 2000, LifeSet]
Type = LifeSet
Trigger1 = (Helper(6000),Life) < 1000
Trigger1 = (Helper(6000),Life)
Value = (Helper(6000),Life)

[State 2000, Back Arm]
Type = Helper
Trigger1 = Time = 202
Name = "Back Arm"
ID = 2001
StateNO = 2001
Pos = 21,-81
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
SuperMoveTime = 216000

[State 2000, Front Arm]
Type = Helper
Trigger1 = Time = 202
Name = "Front Arm"
ID = 2002
StateNO = 2002
Pos = 21,-83
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
SuperMoveTime = 216000

[State 2000, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 1
Value = 0

[State 2000, SuperPause]
Type = SuperPause
Trigger1 = Time = 0
Time = 196
Anim = -1
Sound = S1000,0
Pos = 0,0
MoveTime = 196
Darken = 1
P2DefMul = 0
PowerAdd = 0
UnHittable = 1

[State 2000, Explod]
Type = Explod
Trigger1 = Time = 25
Anim = 1501
ID = 2000
Space = Stage
Pos = -130 * Facing,-255
Facing = Facing
VFacing = 1
BindID = ID
BindTime = -1
Vel = 0,0
Accel = 0,0
RemoveTime = -2
Scale = 1,1
SprPriority = 9
OnTop = 0
Shadow = 0,0,0
OwnPal = 1
RemoveOnGetHit = 1
SuperMoveTime = 216000

[State 2000, Aura Effect]
Type = Explod
Trigger1 = Time = 25
Anim = 1502 + ((PalNo = 4)*5)
ID = 2001
Space = Stage
Pos = 22 * Facing,-54
Facing = Facing
VFacing = 1
BindID = ID
BindTime = -1
Vel = 0,0
Accel = 0,0
RemoveTime = -2
Scale = 1,1
SprPriority = 8
OnTop = 0
Shadow = 0,0,0
OwnPal = 1
RemoveOnGetHit = 1
SuperMoveTime = 216000

[State 2000, Voice]
Type = PlaySnd
Trigger1 = Time = 30
Value = S2000,0
VolumeScale = 100
Channel = 0
LowPriority = 0
Freqmul = 1.0
Loop = 0
Pan = 0

[State 2000, Sound]
Type = PlaySnd
Trigger1 = Time = 49
Value = S2000,2
VolumeScale = 100
Channel = 1
LowPriority = 0
Freqmul = 1.0
Loop = 0
Pan = 0

[State 2000, Effects 1]
Type = Explod
Trigger1 = Time = 49
Anim = 2005
ID = 2002
Space = Stage
Pos = -22 * Facing,-68
Facing = Facing
VFacing = 1
BindID = ID
BindTime = -1
Vel = 0,0
Accel = 0,0
RemoveTime = -2
Scale = 0.5,0.5
SprPriority = 9
OnTop = 0
Shadow = 0,0,0
OwnPal = 1
RemoveOnGetHit = 1
SuperMoveTime = 216000

[State 2000, Effects 2]
Type = Explod
Trigger1 = Time = 49
Anim = 2006
ID = 2006
Space = Stage
Pos = -22 * Facing,-78
Facing = Facing
VFacing = 1
BindID = ID
BindTime = -1
Vel = 0,0
Accel = 0,0
RemoveTime = -2
Scale = 0.5,0.5
SprPriority = 8
OnTop = 0
Shadow = 0,0,0
OwnPal = 1
RemoveOnGetHit = 1
SuperMoveTime = 216000

[State 2000, Voice 2]
Type = PlaySnd
Trigger1 = Time = 193
Value = S2000,1
VolumeScale = 100
Channel = 0
LowPriority = 0
Freqmul = 1.0
Loop = 0
Pan = 0

[State 2000, Aura Effect 2]
Type = Explod
Trigger1 = Time = 193
Anim = 1503 + ((PalNo = 4)*5)
ID = 2004
Space = Stage
Pos = 0,0
Facing = Facing
VFacing = 1
BindID = ID
BindTime = -1
Vel = 0,0
Accel = 0,0
RemoveTime = -2
Scale = 0.5,0.5
SprPriority = 9
OnTop = 0
Shadow = 0,0,0
OwnPal = 1
RemoveOnGetHit = 1
SuperMoveTime = 216000

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = !AILevel
Trigger1 = Time >= 202
Trigger1 = Command = "holdup"
Trigger1 = Var(1) < 45
V = 1
Value = 1

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = !AILevel
Trigger1 = Time >= 202
Trigger1 = Command = "holddown"
Trigger1 = Var(1) > 0
V = 1
Value = -1

[State 2000, VarSet]
Type = VarSet
Trigger1 = AILevel
Trigger1 = Time >= 202
V = 2
Value = -Floor((180*ATan(P2Dist Y/IfElse(P2Dist X <= 0, 0.1, P2Dist X*1.0)))/PI)

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = AILevel
Trigger1 = Time >= 202
Trigger1 = Var(1) < Var(2)
Trigger1 = Var(1) < 45
V = 1
Value = 1

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = AILevel
Trigger1 = Time >= 202
Trigger1 = Var(1) > Var(2)
Trigger1 = Var(1) > 0
V = 1
Value = -1

[State 2000, Helper]
Type = Helper
Trigger1 = Time = 202
Name = "Super Aura Storm"
ID = 2003
StateNO = 2003
Pos = 20,-80
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1

[State 2000, End]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

;---------------------------------------------------------------------------
; Back Arm
[Statedef 2001]
Type = S
MoveType = A
Physics = S
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 2001
PowerAdd = 0
SprPriority = 1

[State 2001, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 1
Facing = 1
Pos = 21, -81

[State 2001, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = Root,Var(1)

[State 2001, DestroySelf]
Type = DestroySelf
Trigger1 = Root,AnimTime >= -3
Trigger2 = Root,StateNO != 2000

;---------------------------------------------------------------------------
; Front Arm
[Statedef 2002]
Type = S
MoveType = A
Physics = S
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 2002
PowerAdd = 0
SprPriority = 3

[State 2002, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 1
Facing = 1
Pos = 21, -83

[State 2002, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = Root,Var(1)

[State 2002, DestroySelf]
Type = DestroySelf
Trigger1 = Root,AnimTime >= -3
Trigger2 = Root,StateNO != 2000

;---------------------------------------------------------------------------
; Super Aura Storm (Helper)
[Statedef 2003]
Type = S
MoveType = A
Physics = S
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 2003 + ((Root,PalNo = 4)*4)
PowerAdd = 0
SprPriority = 9

[State 2003, Trans]
Type = Trans
Trigger1 = Anim = 2003
Trans = Add

[State 2003, Trans]
Type = Trans
Trigger1 = Anim = 2007
Trans = Sub

[State 2003, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = Root,Var(1)
Scale = 1.0 / CameraZoom, 1

[State 2003, Som]
Type = PlaySnd
Trigger1 = Time = 0
Value = S1500,1
VolumeScale = 100
Channel = 4
LowPriority = 0
Freqmul = 1.0
Loop = 0
Pan = 0

[State 2003, Hit]
Type = Helper
Trigger1 = !(Time%10)
Trigger1 = Time < 90
Name = "Hit"
ID = 2004
StateNO = 2004
Pos = 150-ABS(Root,Var(1)), -Root,Var(1)
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 0

[State 2003, Hit]
Type = Helper
Trigger1 = !(Time%10)
Trigger1 = Time < 90
Name = "Hit"
ID = 2004
StateNO = 2004
Pos = 150-ABS(Root,Var(1)) + (750 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (750 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 750

[State 2003, Hit]
Type = Helper
Trigger1 = !(Time%10)
Trigger1 = Time < 90
Name = "Hit"
ID = 2004
StateNO = 2004
Pos = 150-ABS(Root,Var(1)) + (1500 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (1500 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 1500

[State 2003, Hit]
Type = Helper
Trigger1 = Time = 90
Name = "Hit"
ID = 2005
StateNO = 2004
Pos = 150-ABS(Root,Var(1)), -Root,Var(1)
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 0

[State 2003, Hit]
Type = Helper
Trigger1 = Time = 90
Name = "Hit"
ID = 2005
StateNO = 2004
Pos = 150-ABS(Root,Var(1)) + (750 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (750 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 750

[State 2003, Hit]
Type = Helper
Trigger1 = Time = 90
Name = "Hit"
ID = 2005
StateNO = 2004
Pos = 150-ABS(Root,Var(1)) + (1500 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (1500 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 1500

[State 2003, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 1
Facing = 1
Pos = 20,-80

[State 2003, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 2003, Sumir]
Type = DestroySelf
Trigger1 = AnimTime = 0
Trigger2 = Root,StateNO != 2000

;---------------------------------------------------------------------------
; Super Aura Storm (Helper Hit)
[Statedef 2004]
Type = S
MoveType = A
Physics = N
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 2004
PowerAdd = 0
SprPriority = 0

[State 2004, VarSet 1]
Type = VarSet
Trigger1 = (EnemyNear,Const(Size.Mid.Pos.Y) + EnemyNear,Pos Y) < Pos Y
Trigger1 = EnemyNear,Pos Y < 0
V = 0
Value = 1

[State 2004, VarSet 2]
Type = VarSet
Trigger1 = (EnemyNear,Const(Size.Mid.Pos.Y) + EnemyNear,Pos Y) > Pos Y
V = 0
Value = -1

[State 2004, VarSet 3]
Type = VarSet
Trigger1 = (EnemyNear,Const(Size.Mid.Pos.Y) + EnemyNear,Pos Y) = Pos Y
V = 0
Value = 0

[State 2004, VarSet 4]
Type = VarSet
Trigger1 = 1
V = 1
Value = Parent,Pos X + (150 * Facing)-ABS(Root,Var(1))

[State 2004, VarSet 5]
Type = VarSet
Trigger1 = 1
V = 2
Value = Parent,Pos Y + -Root,Var(1)

[State 2004, Hit]
Type = HitDef
Trigger1 = !MoveHit
Trigger1 = !MoveGuarded
Attr = S,HP
Damage = Floor(40.0*(Root,FVar(0))),Floor(14.0*(Root,FVar(0)))
AnimType = Hard
GuardFlag = MA
HitFlag = MAF
Priority = 5,Hit
PauseTime = 0,0
Guard.PauseTime = 0,30
SparkNO = S6001+Random%3
Guard.SparkNO = 40
SparkXY = -10,0
HitSound = S198,5
GuardSound = S199,0
Ground.Type = Low
Ground.SlideTime = 5
Ground.HitTime = 30
Ground.Velocity = -8,Cond(IsHelper(2005), -8, Var(0))
AirGuard.Velocity = -4,Cond(IsHelper(2005), -8, Var(0)/2.0)
Air.Type = Low
Air.Velocity = -8,Cond(IsHelper(2005), -8, Var(0))
Air.HitTime = 30
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Down.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
GetPower = 0,0
GivePower = 0,0
Fall = Cond(IsHelper(2005), 1, 0)
Air.Fall = Cond(IsHelper(2005), 1, 0)
Fall.Recover = 1

[State 2004, TargetFacing]
Type = TargetFacing
Trigger1 = MoveHit = 1
Value = -1

[State 2004, TargetState]
Type = TargetState
Trigger1 = MoveHit = 1
Trigger1 = !IsHelper(2005)
Value = 2005

[State 2004, PosSet]
Type = PosSet
Trigger1 = 1
X = Var(1) + (((25.0 * Time) + Const(Size.Air.Back)) * Cos((Root,Var(1)*PI)/180.0)) * Facing
Y = Var(2) - (((25.0 * Time) + Const(Size.Air.Back)) * Sin((Root,Var(1)*PI)/180.0))

[State 2004, Sumir]
Type = DestroySelf
Trigger1 = Root,StateNO != 2000
Trigger2 = Time = 30

;---------------------------------------------------------------------------
; Enemy Hit by Super Aura Storm
[Statedef 2005]
Type = A
MoveType = H
Physics = N
Juggle = 1
VelSet = 0,0
Ctrl = 0
PowerAdd = 0
SprPriority = 0

[State 2005, ChangeAnim]
Type = ChangeAnim
Trigger1 = SelfAnimExist(5017)
Value = 5017

[State 2005, ChangeAnim 2]
Type = ChangeAnim
Trigger1 = !SelfAnimExist(5017)
Trigger1 = SelfAnimExist(5012)
Value = 5012

[State 2005, ChangeAnim2]
Type = ChangeAnim2
Trigger1 = !SelfAnimExist(5017)
Trigger1 = !SelfAnimExist(5012)
Value = 1506

[State 2005, VelSet]
Type = VelSet
Trigger1 = 1
X = -4
Y = GetHitVar(YVel)

[State 2005, SelfState]
Type = SelfState
Trigger1 = Time = 30
Value = Cond(Pos Y = 0, 0, Cond(Pos Y > 0, 52, 50))
Ctrl = 1



Here is a picture of the attack. The hitboxes can be noted as the "failure box" sprites. This beam can move very smoothly in its corresponding trigonometric angle when the player presses up or down.

Thing is that I'm not looking for a beam that passes through the enemy and continues across the screen. I want in essence, a projectile chain beam with the added functionality of helpers that allow angle orientation of those hitboxes. 

My first attempt involved ridding of the beam helper and only keeping the hitboxes and their behavior. It failed completely, so I figured that the beam helper is required and that I can't make the player do this directly.


So I decided to make that beam helper into a muzzle flash instead and kept the code mostly intact. Here was my latest attempt at trying to take port this code in another character.


Code:
;---------------------------------------------------------------------------
; Super Aura Storm
[Statedef 1999]
Type = S
MoveType = A
Physics = S
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 1100
PowerAdd = -2000
SprPriority = 2

[State 2000, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA,AA,AP,AT
Time = 1
IgnoreHitPause = 1

[State 2000, VarSet]
Type = VarSet
Trigger1 = Time = 0
V = 1
Value = 0

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = !AILevel
Trigger1 = Time >= 20
Trigger1 = Command = "holdup"
Trigger1 = Var(1) < 45
V = 1
Value = 1

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = !AILevel
Trigger1 = Time >= 20
Trigger1 = Command = "holddown"
Trigger1 = Var(1) > 0
V = 1
Value = -1

[State 2000, VarSet]
Type = VarSet
Trigger1 = AILevel
Trigger1 = Time >= 202
V = 2
Value = -Floor((180*ATan(P2Dist Y/IfElse(P2Dist X <= 0, 0.1, P2Dist X*1.0)))/PI)

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = AILevel
Trigger1 = Time >= 202
Trigger1 = Var(1) < Var(2)
Trigger1 = Var(1) < 45
V = 1
Value = 1

[State 2000, VarAdd]
Type = VarAdd
Trigger1 = AILevel
Trigger1 = Time >= 202
Trigger1 = Var(1) > Var(2)
Trigger1 = Var(1) > 0
V = 1
Value = -1

[State 2000, Helper]
Type = Helper
Trigger1 = Time = 20
Name = "Super Aura Storm"
ID = 2003
StateNO = 2003
Pos = 20,-80
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1

[State 2000, End]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

;---------------------------------------------------------------------------
; Super Aura Storm (Helper)
[Statedef 2003]
Type = S
MoveType = A
Physics = S
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 1110
PowerAdd = 0
SprPriority = 9


[State 2003, AngleDraw]
Type = AngleDraw
Trigger1 = 1
Value = Root,Var(1)
Scale = 1.0 / CameraZoom, 1

[State 2003, Hit]
Type = Helper
Trigger1 = !(Time%10)
Trigger1 = Time < 90
Name = "Hit"
ID = 2004
StateNO = 2004
Pos = 1-ABS(Root,Var(1)), -Root,Var(1)
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 0

[State 2003, Hit]
Type = Helper
Trigger1 = !(Time%10)
Trigger1 = Time < 90
Name = "Hit"
ID = 2004
StateNO = 2004
Pos = 1-ABS(Root,Var(1)) + (750 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (750 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 750

[State 2003, Hit]
Type = Helper
Trigger1 = !(Time%10)
Trigger1 = Time < 90
Name = "Hit"
ID = 2004
StateNO = 2004
Pos = 150-ABS(Root,Var(1)) + (1500 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (1500 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 1500

[State 2003, Hit]
Type = Helper
Trigger1 = Time = 90
Name = "Hit"
ID = 2005
StateNO = 2004
Pos = 1-ABS(Root,Var(1)), -Root,Var(1)
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 0

[State 2003, Hit]
Type = Helper
Trigger1 = Time = 90
Name = "Hit"
ID = 2005
StateNO = 2004
Pos = 1-ABS(Root,Var(1)) + (750 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (750 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 750

[State 2003, Hit]
Type = Helper
Trigger1 = Time = 90
Name = "Hit"
ID = 2005
StateNO = 2004
Pos = 1-ABS(Root,Var(1)) + (1500 * Cos((Root,Var(1)*PI)/180.0) * Facing), -Root,Var(1) - (1500 * Sin((Root,Var(1)*PI)/180.0))
PosType = P1
Facing = 1
KeyCtrl = 0
OwnPal = 1
Size.Air.Back = 1500

[State 2003, BindToRoot]
Type = BindToRoot
Trigger1 = 1
Time = 1
Facing = 1
Pos = 0,0

[State 2003, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 2003, Sumir]
Type = DestroySelf
Trigger1 = AnimTime = 0
Trigger2 = Root,StateNO != 1999

;---------------------------------------------------------------------------
; Super Aura Storm (Helper Hit)
[Statedef 2004]
Type = S
MoveType = A
Physics = N
Juggle = 1
VelSet = 0,0
Ctrl = 0
Anim = 1310
PowerAdd = 0
SprPriority = 0

[State 2004, VarSet 1]
Type = VarSet
Trigger1 = (EnemyNear,Const(Size.Mid.Pos.Y) + EnemyNear,Pos Y) < Pos Y
Trigger1 = EnemyNear,Pos Y < 0
V = 0
Value = 1

[State 2004, VarSet 2]
Type = VarSet
Trigger1 = (EnemyNear,Const(Size.Mid.Pos.Y) + EnemyNear,Pos Y) > Pos Y
V = 0
Value = -1

[State 2004, VarSet 3]
Type = VarSet
Trigger1 = (EnemyNear,Const(Size.Mid.Pos.Y) + EnemyNear,Pos Y) = Pos Y
V = 0
Value = 0

[State 2004, VarSet 4]
Type = VarSet
Trigger1 = 1
V = 1
Value = Parent,Pos X + (150 * Facing)-ABS(Root,Var(1))

[State 2004, VarSet 5]
Type = VarSet
Trigger1 = 1
V = 2
Value = Parent,Pos Y + -Root,Var(1)


[State 2004, Hit]
Type = HitDef
Trigger1 = !MoveHit
Trigger1 = !MoveGuarded
Attr = S,HP
Damage = Floor(40.0*(Root,FVar(0))),Floor(14.0*(Root,FVar(0)))
AnimType = Hard
GuardFlag = MA
HitFlag = MAF
Priority = 5,Hit
PauseTime = 0,0
Guard.PauseTime = 0,30
SparkNO = S4000+Random%3
guard.sparkno = S4000
SparkXY = -10,0
HitSound = S1100,1
GuardSound = S199,0
Ground.Type = Low
Ground.SlideTime = 5
Ground.HitTime = 30
Ground.Velocity = -8,Cond(IsHelper(2005), -8, Var(0))
AirGuard.Velocity = -4,Cond(IsHelper(2005), -8, Var(0)/2.0)
Air.Type = Low
Air.Velocity = -8,Cond(IsHelper(2005), -8, Var(0))
Air.HitTime = 30
Ground.CornerPush.VelOff = 0
Air.CornerPush.VelOff = 0
Down.CornerPush.VelOff = 0
Guard.CornerPush.VelOff = 0
Airguard.CornerPush.VelOff = 0
GetPower = 0,0
GivePower = 0,0
Fall = Cond(IsHelper(2005), 1, 0)
Air.Fall = Cond(IsHelper(2005), 1, 0)
Fall.Recover = 1

[State 2004, TargetFacing]
Type = TargetFacing
Trigger1 = MoveHit = 1
Value = -1

[State 2004, TargetState]
Type = TargetState
Trigger1 = MoveHit = 1
Trigger1 = !IsHelper(2005)
Value = 2005

[State 2004, PosSet]
Type = PosSet
Trigger1 = 1
X = Var(1) + (((25.0 * Time) + Const(Size.Air.Back)) * Cos((Root,Var(1)*PI)/180.0)) * Facing
Y = Var(2) - (((25.0 * Time) + Const(Size.Air.Back)) * Sin((Root,Var(1)*PI)/180.0))

[State 2004, Sumir]
Type = DestroySelf
Trigger1 = Root,StateNO != 1999
Trigger2 = Time = 30

;---------------------------------------------------------------------------
; Enemy Hit by Super Aura Storm
[Statedef 2005]
Type = A
MoveType = H
Physics = N
Juggle = 1
VelSet = 0,0
Ctrl = 0
PowerAdd = 0
SprPriority = 0

[State 2005, ChangeAnim]
Type = ChangeAnim
Trigger1 = SelfAnimExist(5017)
Value = 5017

[State 2005, ChangeAnim 2]
Type = ChangeAnim
Trigger1 = !SelfAnimExist(5017)
Trigger1 = SelfAnimExist(5012)
Value = 5012

[State 2005, ChangeAnim2]
Type = ChangeAnim2
Trigger1 = !SelfAnimExist(5017)
Trigger1 = !SelfAnimExist(5012)
Value = 1506

[State 2005, VelSet]
Type = VelSet
Trigger1 = 1
X = -4
Y = GetHitVar(YVel)

[State 2005, SelfState]
Type = SelfState
Trigger1 = Time = 30
Value = Cond(Pos Y = 0, 0, Cond(Pos Y > 0, 52, 50))
Ctrl = 1

-----------------------------------------------------------------------------------------




And unfortunately, it barely functions. It does shoot out the muzzle flash helper and the projectiles but they don't rotate and their collision stops effecting the enemy after the first hits of contact.


BTW, I managed to find the variable (2) stands for at the bottom of the cns files:


;---------------------------------------------------------------------------
; Variáveis em uso
; FVar(0) = Multiplicador de dano
; Var(0) = Seleção de Helper
; Var(1) = Ângulo do Super Aura Storm
; Var(2) = Ângulo do Super Aura Storm (AI) e do Air Aura Sphere (AI)
; Var(3) = Armazena dano recebido em supers
; Var(4) = Dector de 2 vitórias
; Var(8) = Define uso do Special Command para a AI
; Var(9) = Armazena tempo no Extreme Speed
; Var(10) = Controla Tempo dos botões no Extreme Speed
; Var(11) até Var(19) = Armazena state dos botões
; Var(20) até Var(25) = Armazena quantidade dos botões
; Var(26) = Duração do Extreme Speed (Running)
; Var(58) = AI Random
; Var(59) = Armazenagem de vitórias - Não é resetada


Thing is that var(2) is an A.I variable that is never declared anywhere on the cns file. Its simply just addressed as a varset state. I would think that it would need to be declared as a varadd before it can be set to do something, but then again, I don't know if AI components of an attack require variable declarations or not.
Re: TB LUCARIO LASER questions
#4  May 20, 2017, 02:50:41 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Urgh. Lots of deciphering there. This doesn't quite work the way you think based on what i'm reading.

The beam is a single helper. It rotates based on the parents holding of up or down, and moves itself to the correct positions etc via math. The helpers that do the hitting are placed by the same method

[State 2004, PosSet]
Type = PosSet
Trigger1 = 1
X = Var(1) + (((25.0 * Time) + Const(Size.Air.Back)) * Cos((Root,Var(1)*PI)/180.0)) * Facing
Y = Var(2) - (((25.0 * Time) + Const(Size.Air.Back)) * Sin((Root,Var(1)*PI)/180.0))

This bit tells the hitboxes what to do. Based on what var(1) in the root does the values you are dealing with here are the 25.0 and whatever you wish to change with var(1) and var(2) where they are set within the helpers. I'm not going to decipher the math (i suck at math anyway) but the time is the incrementing value and will be moving the helper along each axis. 25 is the speed more or less. The rest is just to align it correctly. Using trigger1 = 1 keeps repositioning it no matter what the root does in terms of rotating the arm sprites.

root: Var(1) is rotation, most of the helpers make use of this somehow.
State 2004: Var(0) is a hitvel changer, once more math, but at a guess more up/back as they are further/closer/higher/lower
var(1) defines X position of the helper based on the root
var(2) defines Y position of the helper based on the root

The posset defines the hitting helpers absolute position.

I also believe in a helper heavy situation this attack would not behave super friendly and helpers would go missing.


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.
Re: TB LUCARIO LASER questions
#5  May 27, 2017, 10:35:46 pm
  • **
  • I'm a llama!
Alright, It been really difficult trying to make this whole thing entirely with helpers here, so I'm thinking that perhaps it should be a mix of projectile and helpers. 

I know that for player instances something like the bottom code would allow the player to change states based on the direction key and holding the attack button:

[State 2200, 18]
type = ChangeState
trigger1 = command = "holdup"
trigger1 = AnimTime = 0
value = 215
ctrl = 0

[State 2200, 18]
type = ChangeState
trigger1 = command = "holddown"
trigger1 = AnimTime = 0
value = 213
ctrl = 0

[State 2200, 18]
type = ChangeState
trigger1 = command != "hold_y"
trigger1 = AnimTime = 0
trigger2 = power < 20
value = 50
ctrl = 1


Its creating the projectile and the helper together to move in a precise stream without breaking off into unnatural pieces from changing directional states, that is becoming a real pain to resolve.




It would even work, if it is in a motion that give the illusion of being a single flame stream that moves like a snake.

These are parameters the control the primary behavior for projectiles:

type = Projectile
trigger1 = //animelem = 2
trigger2 = //animelem = 4
Projremovetime = 6
projmiSStime = 1
projhits = 5
projremove = 1
projpriority = 0
projshadow = 0,0,0
projanim = 218
projscale = .95,.10
projhitanim = 218
projremanim = 218
projcancelanim = 206
velocity = 7,-19

I stumped on what I can add there to make the projectiles go across the screen as well as move precisely to the angular direction they are directed at.
Re: TB LUCARIO LASER questions
#6  May 28, 2017, 09:45:56 am
  • ****
  • Shame on you!
    • USA
You can look at my Dhalsim's ultra to see how it changes what direction he blows the fire. Mine's a little different from other ones, but mainly the same.
Also, I wouldn't change states, just animations. Then use those anim = to control what projectile is used. You could set up 3 animations and 3 projectiles.

One thing though... You think the right side of your image is the unnatural side?? Because just SNAPPING into position is impossible. It should look like the right side, not the left.
Re: TB LUCARIO LASER questions
#7  May 28, 2017, 08:46:38 pm
  • **
  • I'm a llama!
Quote
One thing though... You think the right side of your image is the unnatural side?? Because just SNAPPING into position is impossible. It should look like the right side, not the left.

Because this is a laser projectile, it has to be like the left side, as lasers don't break off into pieces. The snapping in the position is probably the biggest challenge with using projectiles and not helpers. If I can get this done with projectiles, The issue is for the most part resolved. 

This is a key feature of what I'm hoping to make. I hope there is someway to achieve this.
Re: TB LUCARIO LASER questions
#8  May 29, 2017, 02:47:07 am
  • ****
  • Shame on you!
    • USA
Well if that's your character, may I suggest changing from a fire effect to a shine or a lens flare effect. Lasers dont use fire.
I think this is just becoming convoluted. I dont see an actual reason for this much work for that character.
Is the laser animated somehow? Do those yellow dots flow down the line for some reason?
#1 you'd need to destroy your projectile(s) every time you switched the angle of the beam. Projectiles are a bad idea.
#2 anything a projectile can do, a helper can do plus more.
#3 the amount of helpers needed to have this buttery smooth wouldn't affect any type of slowdown for mugen.

You're going to want to spawn 3 or 4 or 5 helpers. Each one is an image of the beam. If P2 jumps in and gets hit by beam #2, parts 3,4,&,5 destroy themselves. Beam #2 would move to P2's bodydistance, so it looks like it's stopped by P2. You'd have to figure out a way of keeping the placement of the broken laser on the same angle as the active ones, in relation to P2's bodydistance.
Like you'd have to adjust the Y placement based on the X position.
If you want the yellow ball things to travel down the line, just make it in the animation. Or make it an explod in the helper.