=============
Teleportation
=============
Created by The Necromancer

;---------------------------------------------------------------------------
Teleportation -- The ability to move from one place to another without 
physical movement.

There are two types of teleportation: Teleportation that works at a fixed
position, and teleportation that works according to a particular situation. 
(eg. opponent's position)
;---------------------------------------------------------------------------

1.) Fixed Teleportation

This particular code can be controlled with the directional keys.

[Statedef 9000]

[State 9000, PlaySnd]
type = PlaySnd
trigger1 = (whatever)
value = *,*

[State 9000, PosSet]
type = PosSet
trigger1 = Pos Y > 0
y = 0

[State 9000, PosAddFwd]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = ((command = "holdfwd") || (command != "holdfwd")) && (command != "holdback") && (command != "holdup") && (command != "holddown")
x = * ;Must be a positive value.
y = 0

[State 9000, PosAddBack]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = (command = "holdback") && (command != "holdfwd") && (command != "holdup") && (command != "holddown")
x = * ;Must be a negative value.
y = 0

[State 9000, PosAddUp]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = (command = "holdup") && (command != "holdfwd") && (command != "holdback") && (command != "holddown")
x = 0
y = * ;Must be a negative value.

[State 9000, PosAddDown]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = (command = "holddown") && (command != "holdfwd") && (command != "holdback") && (command != "holdup")
x = 0
y = * ;Must be a positive value.

[State 9000, PosAddFwdUp]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = (command = "holdfwd") && (command = "holdup") && (command != "holdback") && (command != "holddown")
x = * ;Must be a positive value.
y = * ;Must be a negative value.

[State 9000, PosAddFwdDown]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = (command = "holdfwd") && (command = "holddown") && (command != "holdback") && (command != "holdup")
x = * ;Must be a positive value.
y = * ;Must be a positive value.

[State 9000, PosAddBackUp]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = (command = "holdback") && (command = "holdup") && (command = "holdfwd") && (command = "holddown")
x = * ;Must be a negative value.
y = * ;Must be a negative value.

[State 9000, PosAddBackDown]
type = PosAdd
triggerall = Time = *** ;Time to teleport.
trigger1 = (command = "holdback") && (command = "holddown") && (command != "holdfwd") && (command != "holdup")
x = * ;Must be a negative value.
y = * ;Must be a positive value.

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

2.) Non-Fixed Teleportation: Teleportation is determined by the opponent's position. 
(as an example...)


[Statedef 9000]

[State 9000, PlaySnd]
type = PlaySnd
trigger1 = (whatever)
value = *,*

[State 9000, PosAdd]
type = PosAdd
trigger1 = (whatever)
x = (P2Dist X) + * 
y = (P2dist Y) + *

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

The "+ *" is used, so that your character is given some room away from the opponent, rather
than teleporting at the exact point of where he/she is.
