Code Mugen

titytity

Mario & Luigi
Tham gia ngày
3/4/06
Bài viết
815
Reaction score
38
Ở topic này tui sẽ giải thích 1 số code của mugen ở 2 file cns và file cmd!
mở màn sẽ chỉ mọi người cách code để có các chiêu cơ bản!
Yêu cầu
1.Đã biết xài Fighter Factory (cao hơn beginer chút)
2.Biết nhấn chỗ nào để ra code rùi chỉnh như tui ( cho tiện)
3.Chú thích của tui như sau
Màu đỏ là phần bắt buộc
Màu đen là các giá trị và nó sẽ đươc in đậm
Màu xanh là các tùy chọn có thể thay đổi
Các màu còn lại thì làm nổi bật thui​
Đầu tiên là về cú pháp State mugen
Nó xài ngôn ngữ Script( theo tui)

Và cú pháp của 1 State là như sau
Mở đầu

[Statedef tên_state, chú_thích]
--> tên state là số và là duy nhất
-->chú thích: diễn giải sao cũng dc
Nội dung

[State tên_state, chú_thích]
--> tên_state ko bắt buộc giống tên statedef
Kết thúc

Thường thì kết thúc 1 state người ta thường đưa về trang thái stand ban đầu
[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

Cái 0 là cái state đứng lúc đầu đó
hoặc là chuyển sang 1 state khác
[State 2610, End]
type = ChangeState
trigger1 = animtime = 0
value = 2615
ctrl = 0


 
Bài tiếp theo sẽ nói về 1 số code mà bạn chỉ cần copy vào là có đươc cái damage như vậy liền
Chú ý những đoạn code này đặt dưới đoạn code sau nhé(copy vào file cns-- thay thế cái hitdef nào cũng dc)
[State 0, HitDef]
type = HitDef
Mã:
[CENTER][B]LIGHT GROUND ATTACKS: [/B]          
priority = 7, Hit                                              
pausetime = 13,13                                         
ground.slidetime = 9                                       
ground.hittime = 9                                        
ground.velocity = -6.3                                    
air.velocity = -3.5,-6                                  
guard.velocity = -6.1                                     
guard.pausetime = 11,11                               
guard.slidetime = 10                                     
guard.hittime = 20                                       
guard.ctrltime = 20                                        
ground.cornerpush.veloff = -6                      
air.cornerpush.veloff = -0                            
guard.cornerpush.veloff = -6                         
yaccel = .5    
;-------------------------------------------
[B]HARD GROUND ATTACKS:        [/B]
pausetime = 13,13
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -12
air.velocity = -3.5,-6
guard.velocity = -12
guard.pausetime = 11,11
guard.slidetime = 18
guard.hittime = 36
guard.ctrltime = 36
ground.cornerpush.veloff = -17
air.cornerpush.veloff = -6
guard.cornerpush.veloff = -17
yaccel = .5
;-------------------------------------------
[B]LIGHT AIR ATTACKS: [/B]                  
priority = 7, Hit                                               
pausetime = 11,13                                         
ground.slidetime = 9                                     
ground.hittime = 9                                          
ground.velocity = -6.1                                   
air.velocity = -3.5,-6                                      
guard.velocity = -6.1                                      
guard.pausetime = 11,11                                
guard.slidetime = 10                                       
guard.hittime = 20                                         
guard.ctrltime = 20                                         
ground.cornerpush.veloff = -6                        
air.cornerpush.veloff = -0                               
guard.cornerpush.veloff = -6                          
yaccel = .5                                                     
;-------------------------------------------
[B]HARD AIR ATTACKS:[/B]
priority = 4, Hit
pausetime = 11,13
ground.slidetime = 9
ground.hittime = 9
ground.velocity = -6.1
air.velocity = -3.5,-6
guard.velocity = -6.1
guard.pausetime = 11,11
guard.slidetime = 17
guard.hittime = 20
guard.ctrltime = 20
ground.cornerpush.veloff = -6
air.cornerpush.veloff = -0
guard.cornerpush.veloff = -6
yaccel = .5
;-------------------------------------------
[B]KNOCKDOWN ATTACKS:     [/B]       
priority = 5, Hit                                          
pausetime = 11,13                                                                  
ground.velocity = -4,-8                            
air.velocity = -4,-7                              
guard.velocity = -12                                  
guard.pausetime = 11,11                            
guard.slidetime = 22                               
guard.hittime = 44                             
guard.ctrltime = 44                                
ground.cornerpush.veloff = -17                       
air.cornerpush.veloff = -6                          
guard.cornerpush.veloff = -17                      
yaccel = .5                                                
fall = 1
fall.recover = 1
fall.recovertime = 65[/CENTER]
Nguồn sander71113
 
đoạn code sau sẽ giúp nhân vật của bạn power tăng thêm 1000 nếu "first attack"

[State -2]
type = null
trigger1 = (movetype = H && (stateno != [120,155])) || (target, movetype = H && (target, stateno != [120,155]))
trigger1 = !var(0)
trigger1 = var(0):= movetype = H - target, movetype = H

[State -2]
type = poweradd
trigger1 = var(0)= -1
trigger1 = var(0):= 1
value = 1000

Còn bỏ vô đâu thì.... tui chưa biết( có thể là cmd mà cũng có thể là cns)
Nguồn:http://forum.paodemugen.com.br
 
Back
Top