|
| Making a character? Don't know the code for a move you want? Look here for useful codes for making a DBZ mugen character. Note: the text in bold is the actual code - all other text is notes explaining what each part means. |
| Code 1: A Basic Fireball |
| The following code
can be placed into the characters .cns file: [Statedef 1000] ;this is the state number - it can be any number but for this example we will use 1000 type = S movetype = A physics = S velset = 0,0,0 poweradd = -250 ;use this line if you want the fireball to cost 250 power - remove if you don't ctrl = 0 anim = 1000 ;this is the animation of the fireball linked to an action in the .air file [State 1000, 1] ;this contains information about the projectile trigger1 = AnimElem = 2 ;this triggers when the fireball is released - in this case during the second part of the animation projanim = 1005 ;the animation number of the projectile = action 1005 in the .air file projhitanim = 1009 ;the animation for when the projectile hits = action 1009 in the .air file projpriority = 1 ;how many projectiles of equal or lower priority it can cancel out projremovetime = 100 ;how long the projectile stays in existance before disappearing velocity = 3 ;how fast the projectile travels at accel = 0 ;how fast the projectile accelerates - in this case it doesn't accelerate but stays a constant velocity offset = 23, -54 ;coordinates for the projectiles creation attr = S, SP ;attributes currently applied to the projectile damage = 30,8 ;how much damage the projectile does - the second number is if it is blocked animtype = hard guardflag = MA hitflag = MAFP pausetime = 0,3 ;how long the game is paused for before the projectile is released hitsound = 5,3 ;the sound played when the projectile hits a target (either player 2 or another projectile) guardsound = 6,0 ;the sound played when the projectile is blocked ground.type = low ;the hit animation that player two enters when hit on the ground ground.slidetime = 15 ;this determines how long the player is pushed back by the attack for ground.hittime = 15 ;this is the time the player is in the hit state for ground.velocity = -5 ;this is the speed at which the player is pushed back by the attack air.animtype = low ;the hit animation that player two enters when hit in the air air.velocity = -3,-3 ;the speed at which player two is pushed back when hit in the air by the attack air.juggle = 2 ;how many times the move can juggle a character in the air before they hit the ground [State 1000, 2] ;this ends the move and returns the player to a standing state type = ChangeState trigger1 = AnimTime = 0 ;this indicates that the move ends when the animation ends value = 0 ;this is the state to change to - in this case 0 the standing state ctrl = 1 ;this reasserts player control over the character The following code can be placed in the
characters .cmd file: |