加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

mugen初学者笔记--基础动作 11-08-18

(2011-08-18 02:05:58)
标签:

mugen

菜鸟

杂谈

分类: mugen日志

或许有错...只是些许自己的理解...我也是菜鸟,有兴趣的可以留言讨论

 

;--------------------------------------------------------------------------------------------
;anim说明                                  statedef说明
;0             直立---状态                              直立设置
;5             直立---动作                                      
;10            下蹲---动作                  10            下蹲---动作
;11            下蹲---状态                  11            下蹲---状态
;12            下蹲起身                     12            下蹲起身
;13            空中快速落地---状态          13            空中快速落地---状态                                  
;20            步行动作                     20            步行动作
;40            跳跃准备动作                 40            起跳动作
;41            竖直跳跃                                                           
;42            前跃动作                                                           
;43            后跃动作                                                           
                                          45            空中前后动作
;47            着地动画
                                          50            起跳上升至下落动作
                                          51            上跃下落状态
                                          52            上跃着地动作
;100           前方突进                     100           前方突进
;101           突进刹车                     101           突进刹车
;105           后方急退                     105           后方急退
;106           急退刹车                     106           急退刹车
;110           空中前方突进                 110           空中前方突进
;111           空中突进刹车                                                       
;115           空中后方急退                 115           空中后方急退
;116           空中急退刹车                                                       
;120           防御准备动作,站立            120           防御准备动作
;121           防御准备动作,下蹲                                             
;122           防御准备动作,空中                                                
;130           站立防御动作                 130           站立防御动作
;131           下蹲防御动作                 131           下蹲防御动作
;132           空中防御动作                 132           空中防御动作
;140           防御结束动作,站立            140           防御结束动作
;141           防御结束动作,下蹲
;142           防御结束动作,空中
;150           站立防御时被击中_震          150           站立防御时被击中_震
;151           站立防御时被击中_恢复        151           站立防御时被击中_恢复
;152           下蹲防御时被击中_震          152           下蹲防御时被击中_震
;153           下蹲防御时被击中_恢复        153           下蹲防御时被击中_恢复
;154           空中防御时被击中_震          154           空中防御时被击中_震
;155           空中防御时被击中_恢复        155           空中防御时被击中_恢复
;170           lose时的pose(time over)      170           lose时的pose(time over)
;175           时间到平局 (Time over)       175           时间到平局 (Time over)
;190           预开场介绍                   190           预开场介绍
;191           开场介绍                     191           开场介绍
;
;
;
;5000          站立高位被攻击_震:轻         5000          站立被攻击_震
;5001          站立高位被攻击_震:中         5001          站立被攻击_恢复
;5002          站立高位被攻击_震:重
;5005          站立高位被攻击_恢复:轻
;5006          站立高位被攻击_恢复:中
;5007          站立高位被攻击_恢复:重
                                                          
;
;5010          站立低位被攻击_震:轻         5010           下蹲状态下被攻击_震
;5011          站立低位被攻击_震:中         5011           下蹲状态下被攻击_恢复
;5012          站立低位被攻击_震:重
;5015          站立低位被攻击_恢复:轻
;5016          站立低位被攻击_恢复:中
;5017          站立低位被攻击_恢复:重
;
;5020          下蹲低位被攻击_震:轻
;5021          下蹲低位被攻击_震:中
;5022          下蹲低位被攻击_震:重
;5025          下蹲低位被攻击_恢复:轻
;5026          下蹲低位被攻击_恢复:中
;5027          下蹲低位被攻击_恢复:重
;
;
;5030          被击飞动画                   5030          被击飞动画
;5035
;5040攻击完成时未被击落或下落时未被击落,能够恢复着地姿势  5040攻击完成时未被击落或下落时未被击

                                                                落,能够恢复着地姿势
;5050 攻击完成时被击落 或 下落时被击落,无法能够恢复着地姿势  5050          攻击完成时被击落 或 下

                                                                落时被击落,无法能够恢复着地姿势
;
                                                                                   5200          恢复近地
                                                                                   5210          恢复近空
;
;
;
                                                                         
;6102          跳跃光圈--左                                      
;6103          跳跃光圈--右                                      
                                                                            
                                                                            
                                                                            
;6102          下方光圈                                                                             
;
;
;
;6102          跳跃光圈--左
;6103          跳跃光圈--右
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;var变量定义
;var(0)                通用变量
;var(1)                加速跳跃
;
;
;
;
;
;sysvar临时变量
;sysvar(1)             向前行走walk赋予  ,向后行走walk赋予  -1  ,不动赋予 0
;------------------------------------------------------------------------------------------

[statedef -2];这个是无聊时试着写的0秒回血代码..0秒预结束状态敌人仍活着且自身血量<1000时触发满血

[state -2,lifeset]
type=lifeset
triggerall = !ishelper&&alive
trigger1 = roundstate>2&&enemy,alive
trigger1 = life<1000
value = lifemax
ignorehitpause = 1

;
;--------------------------------------------------------------------------------------------
;直立
[Statedef 0]
Type    = S
Physics = S
SprPriority = 0

[State 0, 动画];anim 5直立状态,0为直立动画,当此时不处于 直立动作与直立状态 或 直立状态(3帧) 完成0秒时,自动跳转至anim 0 即直立动作
Type = ChangeAnim
Trigger1 = Anim != 0 && Anim != 5
Trigger2 = Anim = 5 && AnimTime = 0
Value = 0

[State 0, 移動速度];当完成动画时设y轴上速度为0
Type = VelSet
Trigger1 = Time = 0
Y = 0

[State 0, 移動速度];当完成动画时4 tick且x轴上速度绝对值小于2时设x轴速度为0
Type = VelSet
Trigger1 = Abs(Vel X) < 2
Trigger2 = Time = 4
X = 0

[State 0, KO动画変更];被KO时跳转至state 5050,ko倒地自设state
Type = ChangeState
Trigger1 = !Alive
Value = 5050
Ctrl = 0


;---------------------------------------------------------------------------

; 下蹲动作
[Statedef 10]
Type    = C
Physics = C
Anim = 10

[State 10, 1];下蹲后速度乘设置
Type = VelMul
Trigger1 = Time = 0
x = .75

[State 10, 2];跳转至下蹲状态
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 11


;---------------------------------------------------------------------------

; 下蹲状态设置,6为直立至下蹲动作,11为下蹲状态动作,6为下蹲状态
[Statedef 11]
Type    = C
Physics = C
Anim = 11
sprpriority = 0

[State 11, 动画];下蹲状态动画完成时自动跳转至anim 11,
Type = ChangeAnim
Trigger1 = (Anim = 6) && (AnimTime = 0)
Value = 11

 

 

;---------------------------------------------------------------------------
; 下蹲至起身动作
[Statedef 12]
Type    = S
Physics = S
Anim = 12

[State 12, 1];起身后跳转至状态0
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0


;---------------------------------------------------------------------------
; 空中快速着地设置
[Statedef 13]
Type    = C
Physics = C
Anim    = 13
Ctrl    = 0

[State 13, 1]
Type = VelSet
Trigger1 = Time = 0
Y = 0

[State 13, 2]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 13, 4]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

;---------------------------------------------------------------------------
; 步行动作动画
[Statedef 20]
Type    = S
Physics = S
anim = 0
SprPriority = 0

[State 20, 1];cmd命令中的holdfwd触发时,x轴速度为之前的设定
Type = VelSet
Trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2];cmd命令中的holdback触发时,x轴速度为之前的设定
Type = VelSet
Trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3];x轴速度大于0即正方向前进,且当前动画部位20,5或5动画刚完,则继续运行动画20
Type = ChangeAnim
TriggerAll = vel x > 0
Trigger1 = Anim != 20 && Anim != 5
Trigger2 = Anim = 5 && AnimTime = 0
Value = 20

[State 20, 4]x轴速度小于即反方向前进,且当前动画部位21,5或5动画刚完,则继续运行动画21
Type = ChangeAnim
TriggerAll = vel x < 0
Trigger1 = Anim != 21 && Anim != 5
Trigger2 = Anim = 5 && AnimTime = 0
Value = 21

 


;---------------------------------------------------------------------------
;准备跳跃动画
[Statedef 40]
Type    = S
Physics = S
Anim    = 40
Ctrl    = 0
SprPriority = 1

[State 40, 1];变量赋予 sysvar(1),当开始运行anim 40 时,sysvar(1)为0
Type = VarSet
Trigger1 = Time = 0
sysvar(1) = 0

[State 40, 1];当处于该状态时 z键未被按下,则当按下 快速跳跃 时 var(1)赋予1,否则赋予0
Type = VarSet
Trigger1 = (Time = 0) && (Command != "holdz")
var(1) = IfElse(Command="高速竖直跳跃",1,0)

[State 40, 1];当处于准备起跳状态且按住了z键 或 之前状态处于突进状态,则var(1)赋予1
Type = VarSet
Trigger1 = (Time = 0) && (Command = "holdz")
Trigger2 = PrevStateNo = 100
var(1) = 1

[State 40, 2];当向前走动或向后走动时(即按住 前行键 或 后行键 时),前行键则赋予sysvar(1) 为1,后行键则赋予sysvar(1)为-1
Type = VarSet
Trigger1 = Command = "holdfwd"
Trigger2 = Command = "holdback"
sysvar(1) = IfElse(Command="holdfwd",1,-1)

[State 40, 4];速度设定,准备跳跃动作完成时运行,当sysvar(1)为0时不赋予x轴速度,不为0时则赋予相应速度.y轴速度......省略(y轴负号为向上方向)
Type = VelSet
Trigger1 = AnimTime = 0
X = IfElse(sysvar(1)=0, const(velocity.jump.neu.x), IfElse(sysvar(1)=1, const(velocity.jump.fwd.x)+var(1)*2.8, const(velocity.jump.back.x)-var(1)*2.8))
Y = const(velocity.jump.y)-IfElse(sysvar(1)=0,var(1)*3,var(1)*1)

[State 40, 無敵];起跳不吃投技
Type = NotHitBy
Trigger1 = 1
Value = ,AT

[State 40, 加速光圈];快速跳跃产生光圈效果
Type = Helper
Trigger1 = var(1) = 1
Trigger1 = AnimTime = 0
StateNo = 6102
ID = 6102
Name = "Effect"
Pos = 0,0
PosType = P1
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1


[State 40, 6];跳转至state 50
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 50
ctrl = 1

 


;---------------------------------------------------------------------------
; 空中前后动作
[Statedef 45]
Type    = A
Physics = N
Ctrl    = 0
VelSet = 0,0

[State 45, 3];变量设定,当跳跃完成并着地后sysvar(1)为0
Type = VarSet
Trigger1 = Time = 0
sysvar(1) = 0

[State 45, 4];变量设定,若跳跃中按住前行按钮,则sysvar(1)为1
Type = VarSet
Trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 45, 5];变量设定,若跳跃中按住后退按钮,则sysvar(1)为1
Type = VarSet
Trigger1 = command = "holdback"
sysvar(1) = -1

[State 45, 6];速度设定,当跳跃完成,如果非前行后退则x、y轴速度为设定值,
Type = VelSet
Trigger1 = Time = 0
X = IfElse(sysvar(1)=0, const(velocity.airjump.neu.x),IfElse(sysvar(1)=1, const(velocity.airjump.fwd.x), const(velocity.airjump.back.x)))
Y = const(velocity.airjump.y)

[State 45, 7];处于该状态时间2 tick时跳转至50并能够操作
Type = ChangeState
Trigger1 = Time = 2
Value = 50
Ctrl = 1

 

 

 

 

 

 


;---------------------------------------------------------------------------
; 上跃动作
[Statedef 50]
Type    = A
Physics = A

[State 100, 移動速度];上跃加速度设置,若非走动且高速起跳则触发,跑动则为0.85*var(1)
Type = VelAdd
Trigger1 = sysvar(1) = 0
Y = var(1)*.085

[State 50, 1];变量设定,处该state时,sysvar(1)为0,即原地不走动
Type = VarSet
Trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2];改变动画编号,处于该state时,原地起跳运行41,前跃运行42,后跃运行43
Type = ChangeAnim
Trigger1 = Time = 0
Value = IfElse((Vel X)=0,41,IfElse((Vel X)>0,42,43))


[State 50, 残像];人物残像设置,当 前一状态为40且高速跳跃时启动
Type = AfterImage
Trigger1 = PrevStateNo = 40
Trigger1 = (Time = 1) && (var(1) = 1)
Trans = Add
Time = 6
Length = 10
PalBright = 0,0,0
PalContrast = 73,194,151
PalAdd = 0,0,0
PalMul = .5,.5,.5

 

 


;---------------------------------------------------------------------------???????????
; 上跃下落状态
[Statedef 51]
Type    = A
Physics = A

[State 51, 1]
Type = Null
Trigger1 = 1

 

 


;---------------------------------------------------------------------------
; 上跃着地动作,运行anim 47
[Statedef 52]
Type    = S
Physics = S
Ctrl = 0
Anim = 47

[State 52, 1];处该state时y轴速度为0
Type = VelSet
Trigger1 = Time = 0
y = 0

[State 52, 2];处于该state时y轴坐标为0
Type = PosSet
Trigger1 = Time = 0
y = 0

[State 52, 音]
Type = PlaySnd
Trigger1 = Time = 0
Value = s0,11


[State 52, 3];该动画完成后跳转至anim 0
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

 

 

;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; 前方突进,初始速度0,0
[Statedef 100]
Type    = S
Physics = N
Anim    = 100
Ctrl    = 0
VelSet  = 0,0
SprPriority = 1

[State 100, 移動速度];该state 3 tick后赋予x轴初速度
Type = VelSet
Trigger1 = Time = 3
X = Const(Velocity.Run.Fwd.X)

[State 100, 特殊効果];特殊断言,flag 1:state运行时不会自动转换为walk状态,flag 2:不会自动转换为朝向对方
Type = AssertSpecial
Trigger1 = 1
Flag = NoWalk
Flag2 = NoAutoTurn

[State 100, 残像];前方突进残像设置
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 5
Length = 10
PalBright = 0,0,0
PalContrast = 73,194,151
PalAdd = 0,0,0
PalMul = .5,.5,.5

 


[State 100, 突进火花];爆炸火花(由于该人物前方突进时不止产生突进光圈效果还会产生爆炸火花效果)
Type = Explod
Trigger1 = Time = 3
Anim = 6104
ID = 6104
Pos = -50,-40
PosType = P1
Scale = .5,.5
Ownpal = 1
SprPriority = 1
IgnoreHitPause = 1
Persistent = 1

[State 100, 光圈];前方突进光圈
Type = Helper
Trigger1 = Time = 3
StateNo = 6100
ID = IfElse(Facing=1,6100,6101)
Name = "Effect"
Pos = 20,-40
PosType = P1
Facing = IfElse(Facing=1,1,-1)
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 100, 音]
Type = PlaySnd
Trigger1 = Time = 3
Value = s0,12

[State 100, state変更];前方突进状态大于2 tick时按住 跳跃 按键
Type = ChangeState
Trigger1 = command = "holdup"
Trigger1 = Time > 2
Value = 40

[State 100, state変更];当非ai操控时松开前行键且时间大于10 tick  或时间tick大于49时,运行state 101刹车状态
Type = ChangeState
Trigger1 = command != "holdfwd"
Trigger1 = Time > 10
Trigger2 = Time > 49
Value = 101

[State 100, state変更];当非ai操控且在防御距离会时突然按住后退键,或ai状态且在防御距离内p2空中移动时触发state120
Type = ChangeState
Trigger1 = Command = "holdback"
Trigger1 = InGuardDist
Value = 120

 

 

;---------------------------------------------------------------------------
; 前方突进刹车
[Statedef 101]
Type    = S
Physics = N
Anim    = 101
Ctrl    = 0
SprPriority = 1

[State 101, 速度乗算];先减速然后依靠摩擦力减速
Type = VelMul
Trigger1 = 1
X = .90

[State 101, 特殊効果];特殊断言,flag 1:state运行时不会自动转换为walk状态,flag 2:不会自动转换为朝向对方
Type = AssertSpecial
Trigger1 = 1
Flag = NoWalk
Flag2 = NoAutoTurn

[State 101, state変更];刹车完成后state转为站立状态
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[State 101, state変更];按后退时攻击动作防御,跳转至state 120
Type = ChangeState
Trigger1 = Command = "holdback"
Trigger1 = InGuardDist
Value = 120

 

 

 

 

 

;---------------------------------------------------------------------------
; 向后急退
[Statedef 105]
Type    = S
Physics = S
Anim    = 105
Ctrl    = 0
SprPriority = 1

[State 105, 移動速度];向后急退为低空后跳动作,所以必须给予x,y轴速度,于处于该state后4 tick赋予
Type = VelSet
Trigger1 = Time = 4
X = Const(Velocity.Run.Back.X)
Y = Const(Velocity.Run.Back.Y)

[State 105, 移動速度];
Type = VelAdd
Trigger1 = Time > 4
Y = .12

[State 105, 受力状態変更];状态变更,受攻击状态为a,不受重力作用
Type = StateTypeSet
Trigger1 = Time = 4
StateType = A
Physics = N

[State 105, 残像];残像设置
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 5
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,0
PalMul = .5,.5,.5

[State 105, 急退火花];爆炸效果设置
Type = Explod
Trigger1 = Time = 4
Anim = 6104
ID = 6104
Pos = 40,-40
PosType = P1
Facing = -1
Scale = .5,.5
Ownpal = 1
SprPriority = 1
IgnoreHitPause = 1
Persistent = 1

[State 105, 光圈];光圈设置
Type = Helper
Trigger1 = Time = 4
StateNo = 6100
ID = IfElse(Facing=1,6101,6100)
Name = "Effect"
Pos = 10,-40
PosType = P1
Facing = IfElse(Facing=1,1,-1)
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 105, 無敵];无敌状态,不受sca其中任何一个的攻击
Type = NotHitBy
Trigger1 = 1
Value = SCA

[State 105, 音]
Type = PlaySnd
Trigger1 = Time = 4
Value = s0,12

[State 105, anim变更];动画运行14 tick即转变为state 106进行刹车操作
Type = ChangeAnim
Trigger1 =  Time = 14
Value = 106

[State 105, state変更];当time大于4且处于y轴以下且向下的速度时
Type = ChangeState
Trigger1 = Time > 4
Trigger1 = Pos Y >= 0 && Vel Y > 0
Value = 106

 

 

 

 

 

 

 

 

 

;---------------------------------------------------------------------------
; 向后急退刹车着地
[Statedef 106]
Type    = S
Physics = S
Anim    = 47
Ctrl    = 0

[State 106, 移動速度];xy轴速度变为0
Type = VelSet
Trigger1 = Time = 0
X = 0
Y = 0

[State 106, 軸位置];y轴坐标变为0
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 106, state変更];刹车动作完成并转至state 0
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[State 106, state変更];后退途中受攻击防御
Type = ChangeState
Trigger1 = Command = "holdback"
Trigger1 = InGuardDist
Value = 120

 

 


;---------------------------------------------------------------------------
; 前方空中突进,初始速度为0,并处于N-不受重力,摩擦力状态
[Statedef 110]
Type    = A
Physics = N
Anim    = 110
Ctrl    = 0
VelSet  = 0,0

[State 110, 移動速度];处于该state后4 tick时x轴y轴赋予速度
Type = VelSet
Trigger1 = Time = 4
X = 7
Y = -2

[State 110, 変数増減];空中突进 var(0)赋予 1
Type = VarAdd
Trigger1 = Time = 0
var(0) = 1


[State 110, 残像];空中突进残影
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,0
PalMul = .5,.5,.5

[State 110, 前方突进火花];空中突进爆炸效果
Type = Explod
Trigger1 = Time = 6
Anim = 6104
ID = 6104
Pos = -50,-40
PosType = P1
Scale = .5,.5
Ownpal = 1
SprPriority = 1
IgnoreHitPause = 1
Persistent = 1

[State 110, 光圈];空中突进光圈
Type = Helper
Trigger1 = Time = 6
StateNo = 6100
ID = IfElse(Facing=1,6100,6101)
Name = "Effect"
Pos = 20,-40
PosType = P1
Facing = IfElse(Facing=1,1,-1)
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 110, 音]
Type = PlaySnd
Trigger1 = Time = 6
Value = s0,12

[State 110, 控制权赋予];空中突进6 tick后可控
Type = CtrlSet
Trigger1 = Time = 4
Value = 1

[State 110, 状態変更];4 tick后状态变更,使其受到重力,摩擦力作用而下落
Type = StateTypeSet
Trigger1 = Time = 4
Physics = A

[State 110, anim变更];21 tick后自动跳转anim 111,并于落地时自动运行下落着地state
Type = ChangeAnim
Trigger1 =  Time = 15
Value = 111

 

 

;---------------------------------------------------------------------------
; 后方空中急退,详情见state 110
[Statedef 115]
Type    = A
Physics = N
Anim    = 115
Ctrl    = 0
VelSet  = 0,0

[State 115, 変数増減]
Type = VarAdd
Trigger1 = Time = 0
var(0) = 1

[State 115, 移動速度]
Type = VelSet
Trigger1 = Time = 4
X = -7
Y = -1.8

[State 115, 残像]
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,0
PalMul = .5,.5,.5

[State 115, 急退火花]
Type = Explod
Trigger1 = Time = 6
Anim = 6104
ID = 6104
Pos = 40,-40
PosType = P1
Facing = -1
Scale = .5,.5
Ownpal = 1
SprPriority = 1
IgnoreHitPause = 1
Persistent = 1

[State 115, 光圈]
Type = Helper
Trigger1 = Time = 6
StateNo = 6100
ID = IfElse(Facing=1,6101,6100)
Name = "Effect"
Pos = 10,-40
PosType = P1
Facing = IfElse(Facing=1,1,-1)
Ownpal = 1
IgnoreHitPause = 1
Persistent = 1

[State 115, 音]
Type = PlaySnd
Trigger1 = Time = 6
Value = s0,12

[State 115, 控制权赋予]
Type = CtrlSet
Trigger1 = Time = 4
Value = 1

[State 115, 状態変更]
Type = StateTypeSet
Trigger1 = Time = 4
Physics = A

[State 115, anim变更]
Type = ChangeAnim
Trigger1 =  Time = 15
Value = 116


 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有