The Mugen Multiverse
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome!!! - Bienvenidos!!! - ( We hope you will get involved in the MMV Community which is dedicated to having fun with Mugen ) - Bienvenidos!!! - Welcome!!!
 
PortalHomeFAQMemberlistLatest imagesUsergroupsSearchRegisterComic WIP TrackerDownloadsLog inChat
Website Navigation Help
Translate the Website
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» Vovanilkto
Code Snippet Archive - Page 2 Emptyby RenatoNat.J Today at 10:49 am

» Zatara The Master Magician WIP by RenatoNato
Code Snippet Archive - Page 2 Emptyby RenatoNat.J Today at 10:15 am

» PACK CHARS by RobsonMSH
Code Snippet Archive - Page 2 Emptyby Vovanilkto Today at 3:52 am

» Zatara New VIDEO TEST
Code Snippet Archive - Page 2 Emptyby RenatoNat.J Today at 2:21 am

Special Features at MMV




Chat on MMV w/ Discord

Video Content Creation Reference
Search
 
 

Display results as :
 
Rechercher Advanced Search

 

 Code Snippet Archive

Go down 
+2
Shining
Mazemerald
6 posters
Go to page : Previous  1, 2, 3  Next
AuthorMessage
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Re: Code Snippet Archive   Code Snippet Archive - Page 2 EmptyJuly 24th 2018, 11:25 pm

@Sommbrero666 You are very welcome.

All of these codes (other than the ones I've done by request) I am posting are in the archive download on first post. You can download the whole archive before I post it all here, or wait patiently as I post 2000+ codes here over time. LOL
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Custom BG Music   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 12:17 am

===============
Custom BG Music
===============
Created by The Necromancer

;---------------------------------------------------------------------------
Custom BG Music -- Ever want to play a song against a
particular character? Or a BG Music change during the
3rd match? This code shows how you can play your own
BG music.

----------------------------------------------------------------------------
1.) First, create the BG Music activation. A variable is required for
this effect.

The trigger can be something like:
-RoundNo = 3
-Matcho = 9
etc...

[Statedef -3]
type = VarSet
trigger1 = (whatever)
v = 0
value = 1

Also, you'll need to create the helper. Even if music is not going to play, the helper
will be available to be ready when the effect occurs.

;Custom music creator
[State -3: Helper]
type = Helper
trigger1 = NumHelper(9000) = 0
helpertype = Normal
name = "CustomBGMusic"
id = 9000
pos = 0,0
postype = p1
facing = -1
stateno = 9000
keyctrl = 0
ownpal = 1
supermovetime = 999999999
pausemovetime = 999999999

2.) Now, create a helper. This helper will be reponsible for
creating this effect. (With no interruptions.)

;Custom Music Creator
[Statedef 9000]
etc...

[State 9000: AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Invisible
flag2 = NoShadow

[State 9000: AssertSpecial]
type = AssertSpecial
trigger1 = Parent, Var(0) = 1
flag = NoMusic

[State 9000: NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 9000: PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

;The "loop = 1" is VERY important, to keep the music playing at all times.
[State 9000: PlaySnd]
type = PlaySnd
trigger1 = Parent, Var(0) = 1
value = *,*
loop = 1
abspan = 0
persistent = 0

Imporant Note: Be sure your music files are small! (Don't want to take up too much memory, heh heh...)
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Air Movement (DBZ Style)   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 12:18 am

=========================
Air Movement (DBZ Style)
=========================
Created by Blackshinobi

;--------------------------------------------------------------------------------
Air Movement (DBZ Style) -- This is not to be confused with Flying. Air
movement
is a type of dashing that is continuous and able to be done while in the
air.

WARNING: THIS CODE WILL OVERRIDE YOUR CHARACTERS
DIRECTIONAL JUMPING!

To prevent this (if you want to) add this to the following code
were it is marked ";PREVENT"...

&& (stateno = 50)

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

1.) Open your character's CMD file with any text editor.

2.) Add this list of commands right ABOVE the [Statedef -1] state
definition, making sure they do not have the same name as another command.

It should look a lot like this:

;------Air Movement Commands--------
;Air Movement
[Command]
name = "uf"
command = /UF
time = 1

;Air Movement
[Command]
name = "ub"
command = /UB
time = 1

;Air Movement
[Command]
name = "df"
command = /DF
time = 1

;Air Movement
[Command]
name = "db"
command = /DB
time = 1

;Air Movement
[Command]
name = "up"
command = /U
time = 1

;Air Movement
[Command]
name = "down"
command = /D
time = 1

;Air Movement
[Command]
name = "fow"
command = /F
time = 1

;Air Movement
[Command]
name = "back"
command = /B
time = 1
;-----------------------

3) Place this UNDERNEATH the [Statedef -1] state definition, making
sure they do not have the same stateno (State Number) as another state.

It should look a lot like this:

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 101
triggerall = Var(2) = 0
trigger1 = (command = "fow") && (statetype = A) && (ctrl = 1)

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 102
triggerall = Var(2) = 0
trigger1 = (command = "back") && (statetype = A) && (ctrl = 1) ;PREVENT

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 103
triggerall = Var(2) = 0
trigger1 = (command = "uf") && (statetype = A) && (ctrl = 1) ;PREVENT

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 104
triggerall = Var(2) = 0
trigger1 = (command = "ub") && (statetype = A) && (ctrl = 1) ;PREVENT

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 106
triggerall = Var(2) = 0
trigger1 = (command = "down") && (statetype = A) && (ctrl = 1)

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 107
triggerall = Var(2) = 0
trigger1 = (command = "df") && (statetype = A) && (ctrl = 1)

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 108
triggerall = Var(2) = 0
trigger1 = (command = "db") && (statetype = A) && (ctrl = 1)

;---------------------------------------------------------------------------
;Air Movement
[State -1]
type = ChangeState
value = 109
triggerall = Var(2) = 0
trigger1 = (command = "up") && (statetype = A) && (ctrl = 1) ;PREVENT

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

4) Place this in your characters CNS file UNDERNEATH the [Statedef -2]
state definition, making sure it does not have the same Var number as
a previously used VarSet.

[State -2, AIR MOVEMENT]
type=VarSet
trigger1=life = 0
v=2
value=1

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

5) Place this in your characters CNS file, making sure they do not have the
same Statedef as a previously used state.

It should look a lot like this:

;-------------------
;AIR MOVEMENT Forward
[Statedef 101]
type = A
movetype= I
physics = A
juggle = 0
velset = 12,0 ;Change this to fit your character
ctrl = 1
anim = 101 ;Change this to fit your character

[State 101 , 1]
type = VelAdd
y = -0.45 ;Change this to fit your character
trigger1 = Time >= 0
trigger1 = Time <= 28

;-------OPTI0NAL-----------;Change this to fit your character
[State 101 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTIONAL-----------;Change this to fit your character


[State 101 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;AIR MOVEMENT Back
[Statedef 102]
type = A
movetype= I
physics = A
juggle = 0
velset = -12,-1 ;Change this to fit your character
ctrl = 1
anim = 105 ;Change this to fit your character

[State 102 , 1]
type = VelAdd
y = -0.43 ;Change this to fit your character
trigger1 = Time = [0,28]

;-------OPTI0NAL-----------;Change this to fit your character
[State 102 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTI0NAL-----------;Change this to fit your character


[State 102 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;AIR MOVEMENT Up/Forward
[Statedef 103]
type = A
movetype= I
physics = A
juggle = 0
velset = 12,-12 ;Change this to fit your character
ctrl = 1
anim = 101 ;Change this to fit your character

[State 103 , 1]
type = VelAdd
y = -0.43 ;Change this to fit your character
trigger1 = Time = [0,28]

;-------OPTI0NAL-----------;Change this to fit your character
[State 103 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTI0NAL-----------;Change this to fit your character

[State 103 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;AIR MOVEMENT Up/Back
[Statedef 104]
type = A
movetype= I
physics = A
juggle = 0
velset = -12,-12 ;Change this to fit your character
ctrl = 1
anim = 105 ;Change this to fit your character

[State 104 , 1]
type = VelAdd
y = -0.43 ;Change this to fit your character
trigger1 = Time = [0,28]

;-------OPTI0NAL-----------;Change this to fit your character
[State 104 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTI0NAL-----------;Change this to fit your character

[State 104 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;AIR MOVEMENT Down
[Statedef 106]
type = A
movetype= I
physics = A
juggle = 0
velset = 0,24 ;Change this to fit your character
ctrl = 1
anim = 41 ;Change this to fit your character

[State 106 , 1]
type = VelAdd
y = -1
trigger1 = Time = [0,28]

;-------OPTI0NAL-----------;Change this to fit your character
[State 106 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTI0NAL-----------;Change this to fit your character

[State 106 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;AIR MOVEMENT Down/Forward
[Statedef 107]
type = A
movetype= I
physics = A
juggle = 0
velset = 12,12 ;Change this to fit your character
ctrl = 1
anim = 106 ;Change this to fit your character

[State 106 , 1]
type = VelAdd
y = -0.43 ;Change this to fit your character
trigger1 = Time = [0,28]

;-------OPTI0NAL-----------;Change this to fit your character
[State 107 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTI0NAL-----------;Change this to fit your character

[State 107 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;AIR MOVEMENT Down/Back
[Statedef 108]
type = A
movetype= I
physics = A
juggle = 0
velset = -12,12 ;Change this to fit your character
ctrl = 1
anim = 108 ;Change this to fit your character

[State 108 , 1]
type = VelAdd
y = -0.43 ;Change this to fit your character
trigger1 = Time = [0,28]

;-------OPTI0NAL-----------;Change this to fit your character
[State 108 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTI0NAL-----------;Change this to fit your character

[State 108 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;AIR MOVEMENT Up
[Statedef 109]
type = A
movetype= I
physics = A
juggle = 0
velset = 0,-24 ;Change this to fit your character
ctrl = 1
anim = 41 ;Change this to fit your character

[State 106 , 1]
type = VelAdd
y = -1
trigger1 = Time = [0,28]

;-------OPTI0NAL-----------;Change this to fit your character
[State 106 , 1]
type = AfterImage
trigger1 = time = 0
time = 32
TimeGap = 1
FrameGap = 4
length = 15
trans = add
PalContrast = 200, 200, 200
PalBright = 0,0,0
;-------OPTI0NAL-----------;Change this to fit your character

[State 106 , 3]
type = ChangeState
trigger1 = AnimTime = 50
value = 50
ctrl = 1

=====================================================
For any questions regarding this code, feel free to
contact me at blackshinobi@yahoo.com

Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Flying (VS Style)   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 12:19 am

=================
Flying (VS Style)
=================
Created by Kuzu-bei

;---------------------------------------------------------------------------
Flying (VS Style) -- A special ability of movement in the air. Be sure to
add in a velset with a Y value of 0, if not used.

Be sure to add this in the StateDef of most states. It will prevent the
floating effect from going over to these states.

velset = 0,0
;---------------------------------------------------------------------------
;Begin Flight
[Statedef 9000]
type = A
movetype = I
physics = A
ctrl = 0
anim = ***
velset = 0,-* ; Value to go up

[State 9000, Fly]
type = ChangeState
trigger1 = AnimTime = 0
value = 9001 ; Next state
ctrl = 1

;---------------------------------------------------------------------------
;Flight
[Statedef 9001]
type = S
movetype = I
physics = N
ctrl = 0
anim = 9001

;Creates a guarding ability.
[State 9001, Guard]
type = ChangeState
triggerall = P2MoveType = A
triggerall = P2BodyDist X <= 120
trigger1 = command = "holdback"
value = 130

;When no directional keys are pressed, the character stays in place.
[State 9001, Stop1]
type = VelSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Var(1) = 0
trigger2 = Pos Y < -200
x = 0
y = 0

;Animation of character when no directional keys are pressed.
[State 9001, Stop2]
type = ChangeAnim
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Anim != *** ; Flight animation (neutral)
value = *** ; Flight animation (neutral)

;Sets Var(1) to a value of 1, when the value is currently 2.
[State 9001, VarSet1]
type = VarSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = Var(1) != 2
trigger2 = Var(1) = 2
trigger2 = Vel Y >= 2.4
v = 1
value = 1

;Sets var(1) to a value of 2, when the value is currently 1.
[State 9001, VarSet2]
type = VarSet
triggerall = Var(1) = 1
trigger1 = Vel Y <= -2.4
trigger2 = P2BodyDist Y > 400
trigger2 = Vel Y < 0
v = 1
value = 2

;When Var(1) has a value of 1, the character will float up.
[State 9001, VelAdd1]
type = VelAdd
trigger1 = Var(1) = 1
y = -0.3

;When Var(1) has a value of 2, the character will float down.
[State 9001, VelAdd2]
type = VelAdd
trigger1 = Var(1) = 2
y = 0.3

;When any directional keys are pressed, the float effect stops.
[State 9001, VelSetY]
type = VelSet
triggerall = Var(1) != 0
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
trigger3 = command = "holdup"
trigger4 = command = "holddown"
y = 0

;When any directional keys are pressed, variables will be inactive.
[State 9001, VarSetEnd]
type = VarSet
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
trigger3 = command = "holdup"
trigger4 = command = "holddown"
v = 1
value = 0

;Border to fly.
[State 9001, UpBorder1]
type = PosSet
trigger1 = Pos Y < -200
y = -200

;etc...
[State 9001, UpBorder2a]
type = PosAdd
trigger1 = P2BodyDist Y > 201
trigger1 = Vel Y < 0
y = 1

;etc...
[State 9001, UpBorder2b]
type = VelSet
trigger1 = P2BodyDist Y > 200
trigger1 = Vel Y < 0
y = 0

;Dash forward.
[State 9001, RunFwd]
type = VelSet
trigger1 = Command = "FF"
trigger1 = Vel X < 9
x = 9

;Dash backwards.
[State 9001, RunBack]
type = VelSet
trigger1 = Command = "BB"
trigger1 = Vel X > -8.6
x = -8.6

;Dash downwards.
[State 9001, RunDown]
type = VelSet
trigger1 = Command = "DD"
trigger1 = Vel Y < 8.6
y = 8.6

;Dash upwards.
[State 9001, RunUp]
type = VelSet
trigger1 = Command = "UU"
trigger1 = Vel Y > -8.6
y = -8.6

;Moves the character downwards.
[State 9001, GoDown1]
type = VelAdd
trigger1 = command = "holddown"
y = 0.5

;etc...
[State 9001,GoDown2]
type = VelSet
trigger1 = command = "holddown"
trigger1 = Vel Y < 0
y = 0

;Moves the character upwards.
[State 9001, GoUp1]
type = VelAdd
trigger1 = command = "holdup"
y = -0.4

;etc...
[State 9001,GoUp2]
type = VelSet
trigger1 = command = "holdup"
trigger1 = Vel Y > 0
y = 0

;Animation of flying up.
[State 9001, GoUpAnim]
type = ChangeAnim
trigger1 = Anim != *** ; Fly up animation
trigger1 = command = "holdup"
trigger2 = Anim != *** ; Fly up animation
trigger2 = command = "holddown"
value = *** ; Fly up animation

;Moves the character backwards.
[State 9001, GoBack1]
type = VelAdd
trigger1 = command = "holdback"
x = -0.4

;etc...
[State 9001,GoBack2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = Vel X > 0
x = 0

;Animation of flying backwards.
[State 9001, GoBackAnim]
type = ChangeAnim
trigger1 = Anim != *** ; Fly back animation
trigger1 = command = "holdback"
value = 105

;Moves the character forward.
[State 9001, GoFwd1]
type = VelAdd
trigger1 = command = "holdfwd"
x = 0.5

;etc...
[State 9001,GoFwd2]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = Vel X < 0
x = 0

;Animation of flying forward.
[State 9001, GoFwdAnim]
type = ChangeAnim
trigger1 = Anim != *** ; Fly forward animation
trigger1 = command = "holdfwd"
value = 100

;Character will turn around if the opponent is behind him/her.
[State 9001, Turn]
type = Turn
trigger1 = P2Dist X < 0

;Lands on the ground if character touches the ground.
[State 9001, Land1]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
ctrl = 1

;This ends the flying action if the command is used.
[State 9001, Land2]
type = ChangeState
trigger1 = command = (whatever)
value = 50
ctrl = 1

;Ends the flying action if the round is over.
[State 9001, RoundEnd]
type = ChangeState
trigger1 = Win
trigger2 = Lose
value = 50

Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Haste   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 12:21 am

=====
Haste
=====
Created by SorrowEdge

;---------------------------------------------------------------------------
Haste -- A feature uncommon in fighting games, where your character's speed
is increase. This is a fairly small piece of code, and can be easily
implemented into your character.
;---------------------------------------------------------------------------
;Haste/V-ism
[State -3, Speed]
type = ChangeAnim
triggerall = (RoundState = 2) && (MoveType != H)
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
trigger1 = AnimElemTime(AnimElemNo(0)) > floor ((AnimElemTime(AnimElemNo(0)) - AnimElemTime(AnimElemNo(0) + 1))/2)
ignorehitpause = 1
value = anim
elem = AnimElemNo(0) + 1
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: SFZ2 V-Ism Custom Combo   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 12:23 am

=======================
SFZ2 V-Ism Custom Combo
=======================
Created by Doctor M

;---------------------------------------------------------------------------
This is an immitation of the cool Custom Combo of Street Fighter Zero 2.
You use a state to start the mode, then proceed to walk very fast towards
your enemy. The attacks are super fast, cancellable, and there is no juggle
check, so large air combos are OK.
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;OK, in this example we are using Var(15) as the Mode Timer.
;It would be a good idea to add this Velset to every stand/crouch attack,
;to keep close to your enemy.

[State 200, velset]
type = Velset
trigger1 = Var(15) > 0
x = 4

;---------------------------------------------------------------------------
;Then, open up the CMD file.
;We need to make sure that all the attacks can be cancelled freely.
;Add the following line to the existing triggers:

;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = time > 6
trigger3 = (statetype = S) && movecontact && (Var(15) > 0) ; <- this one!!!

;Also, add a Changestate to use the Mode Change.
;Here is the one I used:

;Custom Combo Start!
[State -1, Vism]
type = ChangeState
value = 9000
triggerall = power > 1000 && var(15) = 0
trigger1 = command = "recovery"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Now, the Change Mode state:

; V-Ism Custom Combo Start!!!
; CNS difficulty: extremely difficult!
[Statedef 9000]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2
ctrl = 0

[State 9000, SuperPause]
type = SuperPause
trigger1 = AnimElem = 3, 1 ;Adjust as you wish.
pos = 15, -77
anim = 100
sound = 20, 0
poweradd = -1000

[State 9000, AfterImage]
type = AfterImage
trigger1 = AnimElem = 3, 1 ;Adjust as you wish.
time = 2
length = 30
PalBright = 0, 0, 0
PalContrast = 100,100,190
PalAdd = 0,0, 30
PalMul = .45,.45,.75
TimeGap = 1
FrameGap = 4
Trans = add

[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 15
value = 300

;The value assigned to Var(15) determines the length of the Mode.

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

;---------------------------------------------------------------------------
;We need a state that makes the player walk forward, so...

; Vism Advance
[Statedef 9001]
type = S
physics = S
anim = 20
sprpriority = 1

[State 9001, VelSet]
type = VelSet
trigger1 = 1
x = 6

[State 9001, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
flag2 = NoAutoTurn

[State 9001, ChangeState]
type = ChangeState
trigger1 = Var(15) = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;To make it work right, override State 0 by adding this state:

; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Goto Vism walk if CC is on
type = ChangeState
trigger1 = Var(15) > 0
value = 4001
ctrl = 1

;---------------------------------------------------------------------------
;And now, the -3's...

[Statedef -3]

[State -3, Timer]
type = VarAdd
trigger1 = Var(15) > 0
v = 15
value = -1
ignorehitpause = 1

[State -3, Cancel] ;Cancel CC Mode if you get hit or win the round
type = VarSet
trigger1 = (MoveType = H) || (Roundstate = 3)
v = 15
value = 0

;Sorrowedge's Haste Code (tm)
;Modified for faster anims
[State -3, Speed]
type = ChangeAnim
triggerall = (Var(15) > 0) && (RoundState = 2) && (MoveType != H)
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
trigger1 = AnimElemTime(AnimElemNo(0)) > floor ((AnimElemTime(AnimElemNo(0)) - AnimElemTime(AnimElemNo(0) + 1))/3)
ignorehitpause = 1
value = anim
elem = AnimElemNo(0) + 1

[State -3, Blink]
type = PalFX
trigger1 = Var(15) > 0 && timemod = 3,0
time = 2
add = 0,16,132
sinadd = 5,32,164,2

[State -3, AfterImageTime] ;This ensures that afterimages are displaying during mode
type = AfterimageTime
trigger1 = var(15) > 0
time = 2

[State -3, NoJuggleCheck] ;Infinnite juggle points!
type = AssertSpecial
trigger1 = var(15) > 0
flag = nojugglecheck

[State -3, AttDwn] ;Tone down the damage
type = AttackMulSet
trigger1 = Var(15) > 0
value = 0.2

[State -3, AttUp] ;Back to normal
type = AttackMulSet
trigger1 = Var(15) = 0
value = 1

;There you are.
;This is the closest I could get to the SFZ2 Custom Counter, but I'm sure that many cool things can be done.
Back to top Go down
yolomate

yolomate


Posts : 7507
Join date : 2013-06-17
Age : 47

Code Snippet Archive - Page 2 Empty
PostSubject: Re: Code Snippet Archive   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 12:31 pm

mmm I got a intro...no really intro is a part of sff...Code Snippet Archive - Page 2 Dv210
and I wait a minutes and before got the classic select screen(arcade, vs etc etc)full music etc etc but the other before not why?I put music in that silence intro?:
[Info]
name = "mugen.v1"
author = "omyv- remix yolomate"
versiondate = 01,01,2015
mugenversion = 1.0
localcoord = 640,480
[Files]
spr = system.sff
snd = system.snd
logo.storyboard = system.def
select = select.def
fight = fight.def
font1 = font1.fnt


[SceneDef]
spr = system.sff
startscene = 0
[Scene 0]
bg.name = intro
end.time = 10
[introDef]
[intro]
type = normal
spriteno = 0,0
start = -320,0
[Music]
title.bgm = data/Justice League Live Action Version Opening Theme.mp3 I put in title
title.bgm.volume = 20
title.bgm.loop = 1
select.bgm = data/Justice league crisis on two earths.mp3 I put this in select char
select.bgm.volume = 40
select.bgm.loop = 1
vs.bgm = data/Justice League Unlimited.mp3 I put this in vs
vs.bgm.volume = 100
vs.bgm.loop = 0

[Title Info]
fadein.time = 0
fadeout.time = 0
menu.pos = 320,160
menu.item.font = 1,0,0
menu.item.active.font = 1,0,0
menu.item.spacing = 0,12
menu.itemname.arcade = "ARCADE"
menu.itemname.versus = "VERSUS"
menu.itemname.teamarcade = "TEAM"
menu.itemname.teamversus = "TEAM VS"
menu.itemname.teamcoop = "TEAM COOP"
menu.itemname.survival = "SURVIVAL"
menu.itemname.survivalcoop ="SURVIVAL COOP"
menu.itemname.training = "TRAINING"
menu.itemname.watch = "WATCH"
menu.itemname.options = "OPTIONS"
menu.itemname.exit = "EXIT"
menu.window.margins.y = 20, 20
menu.window.visibleitems = 12
menu.boxcursor.visible = 1
menu.boxcursor.coords = -42,2,42,-10
cursor.move.snd = 100,0
cursor.done.snd = 100,1
cancel.snd = 100,2
[TitleBGdef]
bgclearcolor = 0,0,0
[TitleBG 0]
type = anim
actionno = 6
layerno = 0
start = -320, 0
mask = 1
[TitleBG 0]
type = anim
actionno = 1
layerno = 0
start = -310,0
mask = 1
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Back Dash (Continuous)   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 8:06 pm

======================
Back Dash (Continuous)
======================
Created by The Necromancer

;---------------------------------------------------------------------------
Back Dash -- By default, characters do not have a back dash, but a back hop.
This is a very simple code that creates the back dash effect.

You may either re-write state 105, or simply make your own. (Which will take
precedence over the default codes.)
;---------------------------------------------------------------------------
This is the new run back state:

[Statedef 105]
type = S
physics = N
ctrl = 0
anim = 105

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 2]
type = CtrlSet
trigger1 = Time = 2
value = 1

[State 105, 3]
type = ChangeState
trigger1 = command != "holdback"
value = 106
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Recovery Roll   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 8:06 pm

=============
Recovery Roll
=============
Created by The Necromancer

;---------------------------------------------------------------------------
Recovery Roll -- From the VS games, it is used to get up, and roll toward
your opponent, or out of the way. In any case, you will make it more difficult
for the opponent to hit you while you are down.
;---------------------------------------------------------------------------
To begin, we first put the following code in the CMD:

;Recovery - Roll
[State -1]
type = VarSet
trigger1 = (Var(0) = 0) && (MoveType = H) && (command = (whatever))
v = 0
value = 1

[State -1]
type = VarSet
trigger1 = ((Var(0) = 1) && (MoveType != H)) || (Lose)
v = 0
value = 0

This is used to set the recovery while your character is in a hit state. If your
character does not fall, then the variable is reset.

Next, the CNS part. Your character is required to use his/her own common1.cns file.

In state 5100: (Add and replace states)

(replace state 5100, 12)

[State 5100, 12]
type = ChangeState
trigger1 = (Var(0) = 0) && (AnimTime = 0)
value = 5101

(add state 5100, 14)

[State 5100, 14]
type = ChangeState
trigger1 = (Var(0) = 1) && (AnimTime = 0)
value = 9000 ;Recovery Roll

And in state 5120

(replace state 5120, 7)

[State 5120, 7]
type = ChangeState
trigger1 = (Var(0) = 0) && (AnimTime = 0)
value = 0
ctrl = 1

(add state 5120, Cool

[State 5120, 8]
type = ChangeState
trigger1 = (Var(0) = 1) && (AnimTime = 0)
value = 9000 ;Recovery Roll

Finally, the Recovery Roll! (Modify as you wish)

; Recovery Roll
[Statedef 9000]
type = L
movetype = I
physics = S
ctrl = 0
anim = 9000
velset = 0,0

[State 9000, VelSet]
type = VelSet
trigger1 = Time >= 0
x = 12

[State 9000, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 9000, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA

[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 0
value = 0

[State 9000, End]
type = ChangeState
trigger1 = (P2Dist X <= -25) || (FrontEdgeBodyDist <= 10)
value = 11
ctrl = 1




Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Alpha Counter   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 8:08 pm

=====================
Alpha Counter
=====================
by MystikBlaze


In the Street Fighter Alpha series, fighters were able to counter the
opponent's attack while they were still in their Guarding state by using
up one level of their power bar.


Just add this in the CMD:
;---------------------------------------------------------------------------
[State -1, Alpha Counter]
type = ChangeState
value = *** ;the A.C. state number
triggerall = command = "ac"
triggerall = power >= 1000
trigger1 = stateno = [150,153]
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Move Interrupt Bonus (Counter)   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 8:09 pm

==============================
Move Interrupt Bonus (Counter)
==============================
Created by SorrowEdge

;---------------------------------------------------------------------------
Move Interrupt -- SNK came up with this great concept, and it has been copied
in some form or another in almost every fighting game thereafter.
;---------------------------------------------------------------------------
First, some prerequistes:
Write down the state numbers for any attack that puts
p2 in a custom state.

Now, put this in Statedef -2. It's a hack-around for
p2prevmovetype(the trigger doesn't exist).

[state -2, A]
type = VarSet
trigger1 = var(2) = 0
ignorehitpause = 1
var(13) = ifelse(p2movetype = A, 1, 0)

[state -2, B]
type = VarSet
trigger1 = var(2) = 1
ignorehitpause = 1
var(1) = ifelse(p2movetype = A, 1, 0)

[state -2, C]
type = VarSet
trigger1 = 1
var(2) = ifelse(var(2) = 1, 0, 1)
ignorehitpause = 1

Then, in state -3(remember to put the state nums you wrote down as exclusions here):

[state -3, TargetState]
type = TargetState
trigger1 = (numtarget > 0) && (ifelse(var(2), var(0), var(1))) && (target, stateno != 9000)
;trigger1 = stateno != 1000
;trigger1 = stateno != [4020, 4045]
;trigger1 = stateno != [500,510] ;hitdefattr != SCA, NT, ST, HT
value = 9000
ignorehitpause = 1

What it does is it puts p2 in a custom state if p2's previous movetype was attack,
unless p2 is already in the custom state, or p1 is throwing p2. If anyone can
improve the throw detection here, I'd greatly appreciate it(hitdefattr doesn't
work for some reason).

Finally, the custom state itself:

;-----------------------
;Counter!
[Statedef 9000]
movetype = H

[State 9000, LifeAdd]
type = LifeAdd
trigger1 = time = 0
value = - floor(gethitvar(damage) / 2)
ignorehitpause = 1
absolute = 0

[State 9000, Envcolor]
type = Envcolor
trigger1 = time = 0
ignorehitpause = 1
time = 1
value = 255,0,0

[state 9000, 5]
type = SelfState
trigger1 = time = 0
ignorehitpause = 1
value = prevstateno

Now, for customization. If you want to give an extra hit or let p2 stagger longer like in
KOF or that pause thingy in SFA3, just add some custom states and send p2 there in the
above state. For displaying the words "counter" or other effects, I guess you'll need a
var to trigger it.
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Counter Attacks   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 8:12 pm

Counter Attacks
Written by The Necromancer

Introduction:
Counter attacks, special features that allow a character to attack in return for an opponent's blow. These are very useful in those really tough battles, and increases a character's fighting ability. In this tutorial, we'll explain how these are made, while blocking, getting hit, and even by taking the initiative: Parrying.
Types of counters:
-There are essentially 3 types of counters:

Block Counters:
-These are the most commonly used type of counters. They occur when your character is in his/her blocking state. The character then returns
the opponent's attack with one of his/her own. Characters such as Kuzu-bei's Broli (updated) support this feature.

Getting Hit Counters:
-Less common, and more cheap, these counters occur whenever your character is in his/her hit state. The character can use this feature quite often, and proves to be very difficult to beat. Characters such as Dark Master's Psycho Shredder support this feature.

Parrying:
-This type of counter requires more skill, as the character uses this feature as a move. The character is required to "catch" the opponent's attack, and by doing so, he/she will be able to return it with one of his/her own.
A brief description:
-In order to make a counter attack, you'll need to first make the move that your character will use as the counter. This is then triggered off when your character is in a particular state. No examples are needed for this tutorial, but are required to have particular codes in them.

Part A: Block Counters

1.) To make a move that is triggered when your character is blocking, you'll need to go to the data folder, and copy the engine's "common1.cns" file into your character's own folder. You'll then need to rename the file, and make the changes in the DEF file, so that this new file will be used as the character's common constants file instead of the engine's default.

-Here is the engine's default codes. We'll show only the standing block, (during shake) but the counter will work in the air and crouch blocking actions (152 and 154) as well.

; SGUARDHIT (shaking)
[Statedef 150]
type = S
movetype= H
physics = N
velset = 0,0
[State 150, Spr]
type = SprPriority
trigger1 = Time >= 0
value = -1
[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150
[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
trigger2 = Time >= 50
trigger2 = Pos Y < 0 value = 151
[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square time = 3
2.) Next, we'll add a little code, so that the counter will work during the block.
; SGUARDHIT (shaking)
[Statedef 150]
type = S
movetype= H
physics = N
velset = 0,0
[State 150, Counter]
type = ChangeState
trigger1 = command = **** < This is the name of your character's counter attack.
value = **** < This is where you input your character's counter attack! It may be any move you like.
[State 150, Spr]
type = SprPriority
trigger1 = Time >= 0
value = -1
[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150
[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
trigger2 = Time >= 50
trigger2 = Pos Y < 0 value = 151
[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square time = 3

-Of course, the same applies to states 152 and 154.


Part B: Getting Hit Counters

1.) As with Block Counters, the same method applies to Getting Hit Counters. But since there are so many of these states, you may want to be more selective. This prevents the character from being too cheap and out of control as an AI.

-States 5000 to 5110 are the getting hit states. All you need to do, is to simply go through the states, and add the required code, as shown earlier.


Part C: Parrying

1.) Different from the other two types, this counter does not require for your character to go to a certain state. Instead, the feature requires for the character to use a parameter, known as a "ReversalDef". This parameter is used to catch one of the opponent's Clsn1 boxes. This does not include projectiles!
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Resurrection   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 8:14 pm

=============
Resurrection:
=============
Created by NodeX
Special thanks to [E] for the projectile suggestion.

;---------------------------------------------------------------------------
Resurrection: The ability to revive if your character is defeated. Gill from
SF3 is one character with such an ability. (Heck, it's his signature move!)
;---------------------------------------------------------------------------
This helper keeps the round from ending when you lose the match

[State -3, Helper]
type = Helper
trigger1 = (RoundState = 2) && (NumHelper(9000) = 0)
helpertype = Player
name = "Resurrection Super"
id = 9000
postype = p1
stateno = 9000
ignorehitpause = 1
pausemovetime = 999999999999999999999
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1

Next, you have to override State 5150. If your character uses its own common states
file, then add the two states to State 5150 (the two states are numbered 10 and 11):

; HIT_LIEDEAD
[Statedef 5150]
type = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 9]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5150, 10]
type = ChangeState
trigger1 = Life > 0
value = 5120

[State 5150, 11]
type = ChangeState
trigger1 = (Life <= 0) && (Var(0) = 0) && (NumHelper(9000) > 0) && (Power >= 1000)
value = 9000

Now, add this to your AIR file. If you change the action number, make sure to
change it in the Resurrection super states:

;Used for projectiles...
[Begin Action 9010]
Clsn2: 1
Clsn2[0] = -23,-640, 19, 0
0,-1, 0,0, -1

The Resurrection super states:

;===================
; Resurrection Super
;===================

[Statedef 9000]
type = S
movetype = I
velset = 0,0
anim = 0
ctrl = 0
poweradd = -1000
sprpriority = 2

This var keeps the Resurrection Super from being used twice in the same round.
[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 0
value = 1

This NotHitby allows the player to recover at least 10% of their life.
The formula used in the trigger goes like this:

life * 10% / 5 (value used in the lifeadd) * 2 (value that is "modding" the time in the lifeadd)

[State 9000, NotHitBy]
type = NotHitBy
trigger1 = Time <= const(data.life) * 0.10 / 5 * 2
;trigger1 = life >= const(data.life) * 0.10 ;An alternate trigger
value = SCA

[State 9000, Width]
type = Width
trigger1 = 1
player = 45

; The reverse vacuum pushes the player away.
[State 9000, Reverse Vacuum]
type = Helper
trigger1 = (Time%3) = 0
name = "Reverse Vacuum"
pos = 0, 0
postype = p1
stateno = 9015
helpertype = normal
facing = 1 ;ifelse(random >= 500, 1, -1)
ignorehitpause = 1
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1

[State 9000, Reverse Vacuum]
type = Helper
trigger1 = (Time%3) = 0
name = "Reverse Vacuum"
pos = 0, 0
postype = p1
stateno = 9015
helpertype = normal
facing = -1 ;ifelse(random >= 500, 1, -1)
ignorehitpause = 1
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1

[State 9000, LifeAdd]
type = LifeAdd
trigger1 = (Time%2) = 0
value = 5

; This "invisible" projectile will "slow down" any projectiles. Thanks to [E] for the suggestion.
[State 9000, Projectile]
type = Projectile
trigger1 = (Time&25) = 0
projanim = 9010
offset = 0,0
velocity = 1, 0
projpriority = 1
projremovetime = 25
; HitDef part of projectile info
attr = S, HP
sparkno = -1
guard.sparkno = -1

[State 9000, ChangeState]
type = ChangeState
trigger1 = life = const(data.life)
value = 0
ctrl = 1

;===========================
; Resurrection Helper States
;===========================

[Statedef 9010]

[State 9010, Invisible]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 9010, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 9010, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 9010, Bind]
type = BindToParent
trigger1 = 1

[State 9010, DestroySelf]
type = DestroySelf
triggerall = parent, life <= 0
trigger1 = (parent, power < 1000) || (parent, var(0) = 1)

;===============
; Reverse Vacuum
;===============

[Statedef 9015]
;type = A
anim = 9015

[State 9015, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 8
range = 1,5

[State 9015, VelSet]
type = VelSet
trigger1 = Time = 0
x = 5 * (3 * var(Cool) + 10 ;30

[State 4015, PlayerPush]
type = PlayerPush
trigger1 = p2bodydist X >= 1
value = 1

[State 9015, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 9015, DestoySelf]
type = DestroySelf
trigger1 = Time > 20

Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Life Persistency   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 9:50 pm

================
Life Persistency
================
Created by The Necromancer

;---------------------------------------------------------------------------
Life Persistency -- One of KOF's unique features, was the
persistentcy of life values between rounds. This is
particularly useful if you are creating a 3 on 3 type
character just as in KOF.

This feature was also present in games such as KI, where
you have one round fights.

This code requires one persistent variable.
;---------------------------------------------------------------------------
1.) To begin, insert this code into statedef -2:

;Life Persistency between rounds.
[State -2: VarSet]
type = VarSet
trigger1 = Win
v = 0
value = Life

2.) Now, in state 180, or your win state, add in this code. This is used
to add in half of your current life, just as in the original KOF games. Of
course, this is optional.

[State 180: LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = (Life/2)
absolute = 1

3.) Finally, in state 5900, add this code in. This is what keeps the life values
between rounds.

[State 5900: LifeSet]
type = LifeSet
trigger1 = (Time = 0) && (RoundNo > 1) && (Var(0) > 0)
value = Ceil(Var(0))

Alternatively, you may use this code instead, if your character does not use it's own
common1.cns file.

[State -2: LifeSet]
type = LifeSet
trigger1 = (RoundState = 1) && (Time = 0) && (RoundNo > 1) && (Var(0) > 0)
value = Ceil(Var(0))
Back to top Go down
thatguy

thatguy


Posts : 1381
Join date : 2014-05-28
Age : 47
Location : Canada

Code Snippet Archive - Page 2 Empty
PostSubject: Invisibility   Code Snippet Archive - Page 2 EmptyJuly 25th 2018, 9:52 pm

==========
Invisibility
==========
Created by Impaler

;---------------------------------------------------------------------------
Invisibility -- You probably remember characters such as
Mortal Kombat's "Reptile", or Killer Instint 2's "Fulgore"
as some of the few to have such an ability.

Quite unique, isn't it? =P
;---------------------------------------------------------------------------
1.) First, the move itself.

[Statedef 9000]
type = S
movetype = I
physics = S
anim = **** ;<---if character has an animation making him/her invisible
ctrl = 0

[State 9000, VarSet]
type = VarSet
trigger1 = AnimTime = 0
v = 0
value = 1

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

2.) Now, the -3 states.

;The invisibility part.
[State -3, AssertSpecial]
type = AssertSpecial
trigger1 = Var(0) = 1
flag = Invisible

;If hit, returns to visible...
[State -3, VarSet]
type = VarSet
trigger1 = (MoveType = H) || (RundState = 3)
v = 0
value = 0
Back to top Go down
Sponsored content





Code Snippet Archive - Page 2 Empty
PostSubject: Re: Code Snippet Archive   Code Snippet Archive - Page 2 Empty

Back to top Go down
 
Code Snippet Archive
Back to top 
Page 2 of 3Go to page : Previous  1, 2, 3  Next
 Similar topics
-
» [CODE TEXT TEMPLATE] Title Animation Cursor Text Code by OldGamer and Destroyal
» Anyone else having this trouble? (mugen archive)
» Kong's sprite rips archive (in case someone didn't know about it...)
» Mugen Archive is the worst site....
» Responding to my constant ban on MUGEN Archive

Permissions in this forum:You cannot reply to topics in this forum
The Mugen Multiverse :: Mugen Related :: Mugen Resources-
Jump to: