home *** CD-ROM | disk | FTP | other *** search
/ ProGames 6 / PROGAMES.iso / linked / KOF2003BW.exe / KOF2003BW / DATA / COMMON1.CNS < prev    next >
Encoding:
Text File  |  2002-03-08  |  38.3 KB  |  1,991 lines

  1. ; Common state file
  2. ;
  3. ; System variables usage
  4. ; ----------------------
  5. ; Var name    Type   Purpose
  6. ; --------    ----   -------
  7. ; sysvar(0)   Temp   Set by state 5081 (HITL_SLIDE) to 1 to prevent
  8. ;                    showing ground hit frame in state 5110 (HIT_LIEDOWN).
  9. ;                    Used by guarding states.
  10. ; sysvar(1)   Temp   Used by state 40 (Jump Start) amd 45 (Air Jump Start)
  11. ;                    to keep track of which way to jump.
  12. ;                    Used by state 5100 and 5110 to remember downward
  13. ;                    velocity of player just before hitting the ground.
  14. ;                    Used in state 5080 for storing the anim # to display.
  15.  
  16. ;---------------------------------------------------------------------------
  17. ; Stand
  18. [Statedef 0]
  19. type = S
  20. physics = S
  21. sprpriority = 0
  22.  
  23. [State 0, 1]
  24. type = ChangeAnim
  25. trigger1 = Anim != 0 && Anim != 5
  26. trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
  27. value = 0
  28.  
  29. [State 0, 2]
  30. type = VelSet
  31. trigger1 = Time = 0
  32. y = 0
  33.  
  34. [State 0, 3] ;Stop moving if low velocity or 4 ticks pass
  35. type = VelSet
  36. trigger1 = abs(vel x) < 2
  37. trigger2 = Time = 4
  38. x = 0
  39.  
  40. ;---------------------------------------------------------------------------
  41. ; Stand to Crouch
  42. [Statedef 10]
  43. type    = C
  44. physics = C
  45. anim = 10
  46.  
  47. [State 10, 1]
  48. type = VelMul
  49. trigger1 = Time = 0
  50. x = .75
  51.  
  52. [State 10, 2]
  53. type = ChangeState
  54. trigger1 = AnimTime = 0
  55. value = 11
  56.  
  57. ;---------------------------------------------------------------------------
  58. ; Crouching
  59. [Statedef 11]
  60. type    = C
  61. physics = C
  62. anim = 11
  63. sprpriority = 0
  64.  
  65. [State 11, 1] ;Change from turning animation
  66. type = ChangeAnim
  67. trigger1 = Anim = 6 && AnimTime = 0
  68. value = 11
  69.  
  70. ;---------------------------------------------------------------------------
  71. ; Crouch to Stand
  72. [Statedef 12]
  73. type    = S
  74. physics = S
  75. anim = 12
  76.  
  77. [State 12, 1]
  78. type = ChangeState
  79. trigger1 = AnimTime = 0
  80. value = 0
  81.  
  82. ;---------------------------------------------------------------------------
  83. ; Walk
  84. [Statedef 20]
  85. type    = S
  86. physics = S
  87. sprpriority = 0
  88.  
  89. [State 20, 1]
  90. type = VelSet
  91. trigger1 = command = "holdfwd"
  92. x = const(velocity.walk.fwd.x)
  93.  
  94. [State 20, 2]
  95. type = VelSet
  96. trigger1 = command = "holdback"
  97. x = const(velocity.walk.back.x)
  98.  
  99. [State 20, 3]
  100. type = ChangeAnim
  101. triggerall = vel x > 0
  102. trigger1 = Anim != 20 && Anim != 5
  103. trigger2 = Anim = 5 && AnimTime = 0
  104. value = 20
  105.  
  106. [State 20, 4]
  107. type = ChangeAnim
  108. triggerall = vel x < 0
  109. trigger1 = Anim != 21 && Anim != 5
  110. trigger2 = Anim = 5 && AnimTime = 0
  111. value = 21
  112.  
  113. ;---------------------------------------------------------------------------
  114. ; Jump Start
  115. [Statedef 40]
  116. type    = S
  117. physics = S
  118. anim = 40
  119. ctrl = 0
  120. sprpriority = 1
  121.  
  122. [State 40, 1]
  123. type = VarSet
  124. trigger1 = Time = 0
  125. sysvar(1) = 0
  126.  
  127. [State 40, 2]
  128. type = VarSet
  129. trigger1 = command = "holdfwd"
  130. sysvar(1) = 1
  131.  
  132. [State 40, 3]
  133. type = VarSet
  134. trigger1 = command = "holdback"
  135. sysvar(1) = -1
  136.  
  137. [State 40, 4]
  138. type = VelSet
  139. trigger1 = AnimTime = 0
  140. x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
  141. y = const(velocity.jump.y)
  142.  
  143. [State 40, 5]
  144. type = VelSet
  145. trigger1 = AnimTime = 0
  146. trigger1 = prevstateno = 100 ;RUN_FWD
  147. trigger1 = sysvar(1) = 1
  148. x = const(velocity.runjump.fwd.x)
  149.  
  150. [State 40, 6]
  151. type = ChangeState
  152. trigger1 = AnimTime = 0
  153. value = 50
  154. ctrl = 1
  155.  
  156. ;---------------------------------------------------------------------------
  157. ; AirJump Start
  158. [Statedef 45]
  159. type    = A
  160. physics = N
  161. ctrl = 0
  162. velset = 0,0
  163.  
  164. [State 45, 1]
  165. type = ChangeAnim
  166. trigger1 = SelfAnimExist(44)
  167. value = 44
  168.  
  169. [State 45, 2]
  170. type = ChangeAnim
  171. trigger1 = !SelfAnimExist(44)
  172. value = 41
  173.  
  174. [State 45, 3]
  175. type = VarSet
  176. trigger1 = Time = 0
  177. sysvar(1) = 0
  178.  
  179. [State 45, 4]
  180. type = VarSet
  181. trigger1 = command = "holdfwd"
  182. sysvar(1) = 1
  183.  
  184. [State 45, 5]
  185. type = VarSet
  186. trigger1 = command = "holdback"
  187. sysvar(1) = -1
  188.  
  189. [State 45, 6]
  190. type = VelSet
  191. trigger1 = Time = 2
  192. x = ifelse(sysvar(1)=0, const(velocity.airjump.neu.x), ifelse(sysvar(1)=1, const(velocity.airjump.fwd.x), const(velocity.airjump.back.x)))
  193. y = const(velocity.airjump.y)
  194.  
  195. [State 45, 7]
  196. type = ChangeState
  197. trigger1 = Time = 2
  198. value = 50
  199. ctrl = 1
  200.  
  201. ;---------------------------------------------------------------------------
  202. ; Jump Up
  203. [Statedef 50]
  204. type    = A
  205. physics = A
  206.  
  207. [State 50, 1]
  208. type = VarSet
  209. trigger1 = Time = 0
  210. sysvar(1) = 0
  211.  
  212. [State 50, 2]
  213. type = ChangeAnim
  214. trigger1 = Time = 0
  215. value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
  216.  
  217. [State 50, 3]
  218. type = ChangeAnim
  219. trigger1 = Vel y > -2
  220. trigger1 = SelfAnimExist(anim + 3)
  221. persistent = 0
  222. value = Anim + 3
  223.  
  224. ;---------------------------------------------------------------------------
  225. ; Jump Down (empty state for compatibility)
  226. [Statedef 51]
  227. type    = A
  228. physics = A
  229.  
  230. [State 51, 1]
  231. type = Null
  232. trigger1 = 1
  233.  
  234. ;---------------------------------------------------------------------------
  235. ; Jump Land
  236. [Statedef 52]
  237. type    = S
  238. physics = S
  239. ctrl = 0
  240. anim = 47
  241.  
  242. [State 52, 1]
  243. type = VelSet
  244. trigger1 = Time = 0
  245. y = 0
  246.  
  247. [State 52, 2]
  248. type = PosSet
  249. trigger1 = Time = 0
  250. y = 0
  251.  
  252. [State 52, 3]
  253. type = CtrlSet
  254. trigger1 = Time = 3
  255. value = 1
  256.  
  257. [State 52, 4]
  258. type = ChangeState
  259. trigger1 = AnimTime = 0
  260. value = 0
  261. ctrl = 1
  262.  
  263. ;---------------------------------------------------------------------------
  264. ; RUN_FWD
  265. [Statedef 100]
  266. type    = S
  267. physics = S
  268. anim = 100
  269. sprpriority = 1
  270.  
  271. [State 100, 1]
  272. type = VelSet
  273. trigger1 = 1
  274. x = const(velocity.run.fwd.x)
  275.  
  276. [State 100, 2] ;Prevent run from canceling into walk
  277. type = AssertSpecial
  278. trigger1 = 1
  279. flag = NoWalk
  280.  
  281. [State 100, 3] ;Prevent from turning
  282. type = AssertSpecial
  283. trigger1 = 1
  284. flag = NoAutoTurn
  285.  
  286. [State 100, 4]
  287. type = ChangeState
  288. trigger1 = command != "holdfwd"
  289. value = 0
  290.  
  291. ;---------------------------------------------------------------------------
  292. ; RUN_BACK
  293. [Statedef 105]
  294. type    = A
  295. physics = A
  296. ctrl = 0
  297. anim = 105
  298. sprpriority = 1
  299.  
  300. [State 105, 1]
  301. type = VelSet
  302. trigger1 = Time = 0
  303. x = const(velocity.run.back.x)
  304. y = const(velocity.run.back.y)
  305.  
  306. [State 105, 2]
  307. type = CtrlSet
  308. trigger1 = Time = 2
  309. value = 1
  310.  
  311. [State 105, 3]
  312. type = ChangeState
  313. trigger1 = Vel Y > 0
  314. trigger1 = Pos Y >= 0
  315. value = 106
  316.  
  317. ;---------------------------------------------------------------------------
  318. ; RUN_BACK2 (land)
  319. [Statedef 106]
  320. type    = S
  321. physics = S
  322. ctrl = 0
  323. anim = 47
  324.  
  325. [State 106, 1]
  326. type = VelSet
  327. trigger1 = Time = 0
  328. y = 0
  329.  
  330. [State 106, 2]
  331. type = PosSet
  332. trigger1 = Time = 0
  333. y = 0
  334.  
  335. [State 106, 3]
  336. type = MakeDust
  337. trigger1 = Time = 2
  338. pos = -5,-2
  339. spacing = 1
  340.  
  341. [State 106, 4]
  342. type = ChangeState
  343. trigger1 = Time = 7
  344. value = 0
  345. ctrl = 1
  346.  
  347. ;---------------------------------------------------------------------------
  348. ; RUN_UP
  349. [Statedef 110]
  350. type    = S
  351. physics = N
  352.  
  353. [State 110, 0]
  354. type = CtrlSet
  355. trigger1 = Time = 0
  356. value = 0
  357.  
  358. [State 110, 1]
  359. type = ChangeAnim
  360. trigger1 = Time = 0
  361. value = 110
  362.  
  363. [State 110, 2]
  364. type = HitBy
  365. trigger1 = Time = 0
  366. value = SCA, NT, ST, HT
  367. time = 30
  368.  
  369. [State 110, 3]
  370. type = VelSet
  371. trigger1 = Time = 0
  372. x = 0
  373. z = -7
  374.  
  375. [State 110, 4]
  376. type = VelMul
  377. trigger1 = 1
  378. z = 0.8
  379.  
  380. [State 110, 5]
  381. type = VelSet
  382. trigger1 = AnimTime = -8
  383. z = 0
  384.  
  385. [State 110, 7]
  386. type = CtrlSet
  387. trigger1 = AnimTime = 0
  388. value = 1
  389.  
  390. [State 110, 8]
  391. type = ChangeState
  392. trigger1 = AnimTime = 0
  393. value = 0
  394.  
  395. ;---------------------------------------------------------------------------
  396. ; RUN_DOWN
  397. [Statedef 115]
  398. type    = S
  399. physics = N
  400.  
  401. [State 115, 0]
  402. type = CtrlSet
  403. trigger1 = Time = 0
  404. value = 0
  405.  
  406. [State 115, 1]
  407. type = ChangeAnim
  408. trigger1 = Time = 0
  409. value = 110
  410.  
  411. [State 115, 2]
  412. type = HitBy
  413. trigger1 = Time = 0
  414. value = SCA, NT, ST, HT
  415. time = 30
  416.  
  417. [State 115, 3]
  418. type = VelSet
  419. trigger1 = Time = 0
  420. x = 0
  421. z = 7
  422.  
  423. [State 115, 4]
  424. type = VelMul
  425. trigger1 = 1
  426. z = 0.8
  427.  
  428. [State 115, 5]
  429. type = VelSet
  430. trigger1 = AnimTime = -8
  431. z = 0
  432.  
  433. [State 115, 7]
  434. type = CtrlSet
  435. trigger1 = AnimTime = 0
  436. value = 1
  437.  
  438. [State 115, 8]
  439. type = ChangeState
  440. trigger1 = AnimTime = 0
  441. value = 0
  442.  
  443. ;---------------------------------------------------------------------------
  444. ; GUARD (start)
  445. [Statedef 120]
  446. type = U    ;Leave state type unchanged
  447. physics = U ;Leave physics unchanged
  448.  
  449. [State 120, 1]
  450. type = ChangeAnim
  451. trigger1 = Time = 0
  452. value = 120 + (statetype = C) + (statetype = A)*2
  453.  
  454. [State 120, 2]
  455. type = StateTypeSet
  456. trigger1 = Time = 0 && statetype = S
  457. physics = S
  458.  
  459. [State 120, 3]
  460. type = StateTypeSet
  461. trigger1 = Time = 0 && statetype = C
  462. physics = C
  463.  
  464. [State 120, 4]
  465. type = StateTypeSet
  466. trigger1 = Time = 0 && statetype = A
  467. physics = A
  468.  
  469. [State 120, 5]
  470. type = ChangeState
  471. trigger1 = AnimTime = 0
  472. value = 130 + (statetype = C) + (statetype = A)*2
  473.  
  474. ;---------------------------------------------------------------------------
  475. ; STAND GUARD (guarding)
  476. [Statedef 130]
  477. type    = S
  478. physics = S
  479.  
  480. [State 130, 1]
  481. type = ChangeAnim
  482. trigger1 = Anim != 130
  483. value = 130
  484.  
  485. ;---------------------------------------------------------------------------
  486. ; CROUCH GUARD (guarding)
  487. [Statedef 131]
  488. type    = C
  489. physics = C
  490.  
  491. [State 131, 1]
  492. type = ChangeAnim
  493. trigger1 = Anim != 131
  494. value = 131
  495.  
  496. ;---------------------------------------------------------------------------
  497. ; AIR GUARD (guarding)
  498. [Statedef 132]
  499. type    = A
  500. physics = N
  501.  
  502. [State 132, 1]
  503. type = ChangeAnim
  504. trigger1 = Anim != 132
  505. value = 132
  506.  
  507. [State 132, 2]
  508. type = VelAdd
  509. trigger1 = 1
  510. y = Const(movement.yaccel)
  511.  
  512. [State 132, 3]
  513. type = VarSet
  514. trigger1 = 1
  515. sysvar(0) = (pos y >= 0) && (vel y > 0)
  516.  
  517. [State 132, 4]
  518. type = VelSet
  519. trigger1 = sysvar(0)
  520. y = 0
  521.  
  522. [State 132, 5]
  523. type = PosSet
  524. trigger1 = sysvar(0)
  525. y = 0
  526.  
  527. [State 132, 6]
  528. type = ChangeState
  529. trigger1 = sysvar(0)
  530. trigger1 = command != "holdback"
  531. value = 52
  532.  
  533. [State 132, 7]
  534. type = ChangeState
  535. trigger1 = sysvar(0)
  536. value = 130
  537.  
  538. ;---------------------------------------------------------------------------
  539. ; GUARD (end)
  540. [Statedef 140]
  541. type = U    ;Leave state type unchanged
  542. physics = U ;Leave physics unchanged
  543. ctrl = 1
  544.  
  545. [State 140, 1]
  546. type = ChangeAnim
  547. trigger1 = Time = 0
  548. value = 140 + (statetype = C) + (statetype = A)*2
  549.  
  550. [State 140, 2]
  551. type = StateTypeSet
  552. trigger1 = Time = 0 && statetype = S
  553. physics = S
  554.  
  555. [State 140, 3]
  556. type = StateTypeSet
  557. trigger1 = Time = 0 && statetype = C
  558. physics = C
  559.  
  560. [State 140, 4]
  561. type = StateTypeSet
  562. trigger1 = Time = 0 && statetype = A
  563. physics = A
  564.  
  565. ;[State 140, 5] ;Implemented within engine
  566. ;type = ChangeState
  567. ;trigger1 = AnimTime = 0
  568. ;value = (statetype = C)*11 + (statetype = A)*51
  569.  
  570. ;---------------------------------------------------------------------------
  571. ; SGUARDHIT (shaking)
  572. [Statedef 150]
  573. type    = S
  574. movetype= H
  575. physics = N
  576. velset = 0,0
  577.  
  578. [State 150, 1]
  579. type = ChangeAnim
  580. trigger1 = 1
  581. value = 150
  582.  
  583. [State 150, 2]
  584. type = ChangeState
  585. trigger1 = HitShakeOver
  586. value = 151
  587.  
  588. [State 150, 3]
  589. type = ForceFeedback
  590. trigger1 = time = 0
  591. waveform = square
  592. time = 3
  593.  
  594. ;---------------------------------------------------------------------------
  595. ; SGUARDHIT2 (knocked back)
  596. [Statedef 151]
  597. type    = S
  598. movetype= H
  599. physics = S
  600. anim = 150
  601.  
  602. [State 151, 1]
  603. type = HitVelSet
  604. trigger1 = Time = 0
  605. x = 1
  606.  
  607. [State 151, 2]
  608. type = VelSet
  609. trigger1 = Time = GetHitVar(slidetime)
  610. trigger2 = Time >= GetHitVar(hittime)
  611. x = 0
  612.  
  613. [State 151, 3]
  614. type = CtrlSet
  615. trigger1 = Time = GetHitVar(ctrltime)
  616. value = 1
  617.  
  618. [State 151, 4]
  619. type = ChangeState
  620. trigger1 = Time >= GetHitVar(hittime)
  621. value = 130
  622. ctrl = 1
  623.  
  624. ;---------------------------------------------------------------------------
  625. ; CGUARDHIT (shaking)
  626. [Statedef 152]
  627. type    = C
  628. movetype= H
  629. physics = N
  630. velset = 0,0
  631.  
  632. [State 152, 1]
  633. type = ChangeAnim
  634. trigger1 = 1
  635. value = 151
  636.  
  637. [State 152, 3]
  638. type = ChangeState
  639. trigger1 = HitShakeOver
  640. value = 153
  641.  
  642. [State 152, 4]
  643. type = ForceFeedback
  644. trigger1 = time = 0
  645. waveform = square
  646. time = 4
  647.  
  648. ;---------------------------------------------------------------------------
  649. ; CGUARDHIT2 (knocked back)
  650. [Statedef 153]
  651. type    = C
  652. movetype= H
  653. physics = C
  654. anim = 151
  655.  
  656. [State 153, 1]
  657. type = HitVelSet
  658. trigger1 = Time = 0
  659. x = 1
  660.  
  661. [State 153, 2]
  662. type = VelSet
  663. trigger1 = Time = GetHitVar(slidetime)
  664. trigger2 = Time >= GetHitVar(hittime)
  665. x = 0
  666.  
  667. [State 153, 3]
  668. type = CtrlSet
  669. trigger1 = Time = GetHitVar(ctrltime)
  670. value = 1
  671.  
  672. [State 153, 4]
  673. type = ChangeState
  674. trigger1 = Time >= GetHitVar(hittime)
  675. value = 131
  676. ctrl = 1
  677.  
  678. ;---------------------------------------------------------------------------
  679. ; AGUARDHIT (shaking)
  680. [Statedef 154]
  681. type    = A
  682. movetype= H
  683. physics = N
  684. velset = 0,0
  685.  
  686. [State 154, 1]
  687. type = ChangeAnim
  688. trigger1 = 1
  689. value = 152
  690.  
  691. [State 154, 2]
  692. type = ChangeState
  693. trigger1 = HitShakeOver
  694. value = 155 ;AGUARDHIT2
  695.  
  696. [State 154, 3]
  697. type = ForceFeedback
  698. trigger1 = time = 0
  699. waveform = square
  700. time = 4
  701.  
  702. ;---------------------------------------------------------------------------
  703. ; AGUARDHIT2 (knocked away)
  704. [Statedef 155]
  705. type    = A
  706. movetype= H
  707. physics = N
  708. anim = 152
  709.  
  710. [State 155, 1]
  711. type = HitVelSet
  712. trigger1 = Time = 0
  713. x = 1
  714. y = 1
  715.  
  716. [State 155, 2]
  717. type = VelAdd
  718. trigger1 = 1
  719. y = Const(movement.yaccel)
  720.  
  721. [State 155, 3]
  722. type = CtrlSet
  723. trigger1 = Time = GetHitVar(ctrltime)
  724. value = 1
  725.  
  726. [State 155, 4]
  727. type = VarSet
  728. trigger1 = 1
  729. sysvar(0) = (pos y >= 0) && (vel y > 0)
  730.  
  731. [State 155, 5]
  732. type = VelSet
  733. trigger1 = sysvar(0)
  734. y = 0
  735.  
  736. [State 155, 6]
  737. type = PosSet
  738. trigger1 = sysvar(0)
  739. y = 0
  740.  
  741. [State 155, 7]
  742. type = ChangeState
  743. trigger1 = sysvar(0)
  744. trigger1 = command != "holdback"
  745. value = 52
  746.  
  747. [State 155, 8]
  748. type = ChangeState
  749. trigger1 = sysvar(0)
  750. value = 130
  751.  
  752. ;---------------------------------------------------------------------------
  753. ; LOSE (Time over)
  754. [Statedef 170]
  755. type = S
  756. ctrl = 0
  757. anim = 170
  758. velset = 0,0
  759.  
  760. [State 170, 1]
  761. type = NotHitBy
  762. trigger1 = 1
  763. value = SCA
  764. time = 1
  765.  
  766. ;---------------------------------------------------------------------------
  767. ; DRAWGAME (Time over)
  768. [Statedef 175]
  769. type = S
  770. ctrl = 0
  771. velset = 0,0
  772.  
  773. [State 175, 1] ; If no anim, use go to lose state.
  774. type = ChangeState
  775. trigger1 = Time = 0
  776. trigger1 = !SelfAnimExist(175)
  777. value = 170
  778.  
  779. [State 175, 2]
  780. type = ChangeAnim
  781. trigger1 = Time = 0
  782. value = 175
  783.  
  784. [State 175, 3]
  785. type = NotHitBy
  786. trigger1 = 1
  787. value = SCA
  788. time = 1
  789.  
  790. ;---------------------------------------------------------------------------
  791. ; PREINTRO
  792. [Statedef 190]
  793. type = S
  794. ctrl = 0
  795. velset = 0,0
  796.  
  797. [State 190, 1]
  798. type = ChangeAnim
  799. trigger1 = SelfAnimExist(190)
  800. value = 190
  801.  
  802. [State 190, 2] ;Go straight to intro.
  803. type = ChangeState
  804. trigger1 = Time = 0
  805. value = 191
  806.  
  807. ;---------------------------------------------------------------------------
  808. ; INTRO (override this state to give character an intro)
  809. [Statedef 191]
  810. type = S
  811. ctrl = 0
  812.  
  813. [State 191, 1]
  814. type = ChangeState
  815. trigger1 = Time = 0
  816. value = 0
  817.  
  818. ;---------------------------------------------------------------------------
  819. ; HITG_SHAKE
  820. [Statedef 5000]
  821. type    = S
  822. movetype= H
  823. physics = N
  824. velset = 0,0
  825.  
  826. [State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
  827. type = ChangeAnim
  828. trigger1 = Time = 0
  829. trigger1 = GetHitVar(animtype) != [3,5]
  830. value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)
  831.  
  832. [State 5000, 2] ;Anim for HIT_BACK
  833. type = ChangeAnim
  834. trigger1 = Time = 0
  835. trigger1 = GetHitVar(animtype) = [3,5]
  836. value = 5030
  837.  
  838. [State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
  839. type = ChangeAnim
  840. trigger1 = Time = 0
  841. trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
  842. value = 5047 + GetHitVar(animtype) ;5051 - 4 + type
  843.  
  844. [State 5000, 3] ;Freeze anim
  845. type = ChangeAnim
  846. trigger1 = Time > 0
  847. value = anim
  848.  
  849. [State 5000, 4] ;State type gets set to aerial if getting hit up
  850. type = StateTypeSet
  851. trigger1 = Time = 0
  852. trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
  853. trigger2 = Pos Y != 0
  854. type = a
  855.  
  856. [State 5000, 5]
  857. type = ChangeState
  858. trigger1 = HitShakeOver
  859. trigger1 = GetHitVar(yvel) = 0
  860. value = 5001 ;HITG_SLIDE
  861.  
  862. [State 5000, 6]
  863. type = ChangeState
  864. trigger1 = HitShakeOver
  865. value = 5030
  866.  
  867. [State 5000, FFB Light]
  868. type = ForceFeedback
  869. trigger1 = anim = 5000
  870. trigger2 = anim = 5010
  871. persistent = 0
  872. time = 6
  873. waveform = square
  874.  
  875. [State 5000, FFB Medium]
  876. type = ForceFeedback
  877. trigger1 = anim = 5001
  878. trigger2 = anim = 5011
  879. persistent = 0
  880. time = 8
  881. waveform = sinesquare
  882. ampl = 110,-1,-.3
  883.  
  884. [State 5000, FFB Hard]
  885. type = ForceFeedback
  886. trigger1 = anim = 5012
  887. trigger2 = anim = 5002
  888. trigger3 = anim = 5030
  889. persistent = 0
  890. time = 15
  891. waveform = sinesquare
  892. ampl = 140
  893.  
  894. ;---------------------------------------------------------------------------
  895. ; HITG_SLIDE
  896. [Statedef 5001]
  897. type    = S
  898. movetype= H
  899. physics = S
  900.  
  901. [State 5001, 1]
  902. type = HitVelSet
  903. trigger1 = Time = 0
  904. x = 1
  905.  
  906. [State 5001, 2]
  907. type = ChangeAnim
  908. trigger1 = AnimTime = 0
  909. value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10
  910.  
  911. [State 5001, 3] ;Stop sliding back
  912. type = VelMul
  913. trigger1 = Time >= GetHitVar(slidetime)
  914. x = .6
  915.  
  916. [State 5001, 4]
  917. type = VelSet
  918. trigger1 = HitOver
  919. x = 0
  920.  
  921. [State 5001, 5]
  922. type = DefenceMulSet
  923. trigger1 = HitOver
  924. value = 1
  925.  
  926. [State 5001, 6]
  927. type = ChangeState
  928. trigger1 = HitOver
  929. value = 0
  930. ctrl = 1
  931.  
  932. ;---------------------------------------------------------------------------
  933. ; HITC_SHAKE
  934. [Statedef 5010]
  935. type    = C
  936. movetype= H
  937. physics = N
  938. velset = 0,0
  939.  
  940. [State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
  941. type = ChangeAnim
  942. trigger1 = Time = 0
  943. trigger1 = GetHitVar(animtype) != [3,5]
  944. value = 5020 + GetHitVar(animtype)
  945.  
  946. [State 5010, 2] ;Anim for HIT_BACK
  947. type = ChangeAnim
  948. trigger1 = Time = 0
  949. trigger1 = GetHitVar(animtype) = [3,5]
  950. value = 5030
  951.  
  952. [State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
  953. type = ChangeAnim
  954. trigger1 = Time = 0
  955. trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
  956. value = 5047 + GetHitVar(animtype) ;5051 - 4 + type
  957.  
  958. [State 5010, 4] ;Freeze anim
  959. type = ChangeAnim
  960. trigger1 = Time > 0
  961. value = anim
  962.  
  963. [State 5010, 5]
  964. type = ChangeState
  965. trigger1 = HitShakeOver
  966. trigger1 = GetHitVar(yvel) = 0
  967. value = 5011 ;HITC_SLIDE
  968.  
  969. [State 5010, 6]
  970. type = ChangeState
  971. trigger1 = HitShakeOver
  972. value = 5030
  973.  
  974. [State 5010, FFB Light]
  975. type = ForceFeedback
  976. trigger1 = anim = 5020
  977. persistent = 0
  978. time = 6
  979. waveform = square
  980.  
  981. [State 5010, FFB Medium]
  982. type = ForceFeedback
  983. trigger1 = anim = 5021
  984. persistent = 0
  985. time = 8
  986. waveform = sinesquare
  987. ampl = 110,-1,-.3
  988.  
  989. [State 5010, FFB Hard]
  990. type = ForceFeedback
  991. trigger1 = anim = 5022
  992. persistent = 0
  993. time = 15
  994. waveform = sinesquare
  995. ampl = 140
  996.  
  997. ;---------------------------------------------------------------------------
  998. ; HITC_SLIDE
  999. [Statedef 5011]
  1000. type    = C
  1001. movetype= H
  1002. physics = C
  1003.  
  1004. [State 5011, 1]
  1005. type = HitVelSet
  1006. trigger1 = Time = 0
  1007. x = 1
  1008.  
  1009. [State 5011, 2]
  1010. type = ChangeAnim
  1011. trigger1 = AnimTime = 0
  1012. value = 5025 + GetHitVar(animtype)
  1013.  
  1014. [State 5011, 3] ;Stop sliding back
  1015. type = VelMul
  1016. trigger1 = Time >= GetHitVar(slidetime)
  1017. x = .6
  1018.  
  1019. [State 5011, 4]
  1020. type = VelSet
  1021. trigger1 = HitOver
  1022. x = 0
  1023.  
  1024. [State 5011, 5]
  1025. type = DefenceMulSet
  1026. trigger1 = HitOver
  1027. value = 1
  1028.  
  1029. [State 5011, 6]
  1030. type = ChangeState
  1031. trigger1 = HitOver
  1032. value = 11
  1033. ctrl = 1
  1034.  
  1035.  
  1036. ;---------------------------------------------------------------------------
  1037. ; HITA_SHAKE
  1038. [Statedef 5020]
  1039. type    = A
  1040. movetype= H
  1041. physics = N
  1042. velset = 0,0
  1043.  
  1044. [State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
  1045. type = ChangeAnim
  1046. trigger1 = Time = 0
  1047. trigger1 = GetHitVar(animtype) != [3,5]
  1048. value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)
  1049.  
  1050. [State 5020, 2] ;Anim for HIT_BACK
  1051. type = ChangeAnim
  1052. trigger1 = Time = 0
  1053. trigger1 = GetHitVar(animtype) = [3,5]
  1054. value = 5030
  1055.  
  1056. [State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
  1057. type = ChangeAnim
  1058. trigger1 = Time = 0
  1059. trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
  1060. value = 5047 + GetHitVar(animtype) ;5051 - 4 + type
  1061.  
  1062. [State 5020, 4] ;Freeze anim
  1063. type = ChangeAnim
  1064. trigger1 = Time > 0
  1065. value = anim
  1066.  
  1067. [State 5020, 5]
  1068. type = ChangeState
  1069. trigger1 = HitShakeOver
  1070. value = 5030
  1071.  
  1072. [State 5020, FFB Light]
  1073. type = ForceFeedback
  1074. trigger1 = anim = 5000
  1075. trigger2 = anim = 5010
  1076. persistent = 0
  1077. time = 6
  1078. waveform = square
  1079.  
  1080. [State 5020, FFB Medium]
  1081. type = ForceFeedback
  1082. trigger1 = anim = 5001
  1083. trigger2 = anim = 5011
  1084. persistent = 0
  1085. time = 8
  1086. waveform = sinesquare
  1087. ampl = 110,-1,-.3
  1088.  
  1089. [State 5020, FFB Hard]
  1090. type = ForceFeedback
  1091. trigger1 = anim = 5012
  1092. trigger2 = anim = 5002
  1093. trigger3 = anim = 5030
  1094. trigger4 = anim = [5051,5059]
  1095. persistent = 0
  1096. time = 15
  1097. waveform = sinesquare
  1098. ampl = 140
  1099.  
  1100. ;---------------------------------------------------------------------------
  1101. ; HITA_UP (initial going up)
  1102. [Statedef 5030]
  1103. type    = A
  1104. movetype= H
  1105. physics = N
  1106. ctrl = 0
  1107.  
  1108. [State 5030, 1]
  1109. type = VelAdd;Gravity
  1110. trigger1 = 1
  1111. y = GetHitVar(yaccel)
  1112.  
  1113. [State 5030, 2]
  1114. type = HitVelSet
  1115. trigger1 = Time = 0
  1116. x = 1
  1117. y = 1
  1118.  
  1119. [State 5030, 3]
  1120. type = ChangeState
  1121. triggerall = !HitFall
  1122. trigger1 = HitOver
  1123. trigger2 = Vel Y > 0    ;Hit ground
  1124. trigger2 = Pos Y >= 10  ;.
  1125. value = 5040 ;HITA_RECOV
  1126.  
  1127. [State 5030, 4]
  1128. type = ChangeState
  1129. triggerall = HitFall
  1130. trigger1 = HitOver
  1131. trigger2 = Vel Y > 0    ;Hit ground
  1132. trigger2 = Pos Y >= 10  ;.
  1133. value = 5050 ;HITA_FALL
  1134.  
  1135. [State 5030, 5]
  1136. type = ChangeState
  1137. trigger1 = AnimTime = 0
  1138. value = 5035 ;HITA_UP (transition)
  1139.  
  1140. ;---------------------------------------------------------------------------
  1141. ; HITA_UP_T (transition)
  1142. [Statedef 5035]
  1143. type    = A
  1144. movetype= H
  1145. physics = N
  1146.  
  1147. [State 5035, 1]
  1148. type = ChangeAnim
  1149. trigger1 = Time = 0
  1150. trigger1 = SelfAnimExist(5035)
  1151. trigger1 = Anim != [5051,5059] ;Not if in hit up anim
  1152. trigger1 = Anim != 5090 ;Not if hit off ground anim
  1153. value = 5035
  1154.  
  1155. [State 5035, 2]
  1156. type = VelAdd
  1157. trigger1 = 1
  1158. y = GetHitVar(yaccel)
  1159.  
  1160. [State 5035, 3]
  1161. type = ChangeState
  1162. triggerall = !HitFall
  1163. trigger1 = HitOver  ;Hit is over
  1164. trigger2 = AnimTime = 0 ;Animation over
  1165. trigger3 = Vel Y > 0    ;Hit ground
  1166. trigger3 = Pos Y >= 10  ;.
  1167. trigger4 = Time = 0     ;No transition anim
  1168. trigger4 = Anim != 5035 ;.
  1169. value = 5040 ;HITA_RECOV
  1170.  
  1171. [State 5035, 4]
  1172. type = ChangeState
  1173. triggerall = HitFall
  1174. trigger1 = HitOver  ;Hit is over
  1175. trigger2 = AnimTime = 0 ;Anim is over
  1176. trigger3 = Vel Y > 0    ;Hit ground
  1177. trigger3 = Pos Y >= 10  ;.
  1178. trigger4 = Time = 0     ;No transition anim
  1179. trigger4 = Anim != 5035 ;.
  1180. value = 5050 ;HITA_FALL
  1181.  
  1182. ;---------------------------------------------------------------------------
  1183. ; HITA_RECOV (recovering in air, not falling)
  1184. [Statedef 5040]
  1185. type    = A
  1186. movetype= H
  1187. physics = N
  1188.  
  1189. [State 5040, 1]
  1190. type = ChangeState
  1191. trigger1 = !Alive
  1192. value = 5050
  1193.  
  1194. [State 5040, 2]
  1195. type = ChangeAnim
  1196. trigger1 = AnimTime = 0
  1197. trigger1 = Anim != 5040
  1198. trigger2 = Time = 0
  1199. trigger2 = Anim != 5035
  1200. value = 5040
  1201.  
  1202. [State 5040, 3]
  1203. type = CtrlSet
  1204. trigger1 = HitOver
  1205. value = 1
  1206.  
  1207. [State 5040, 4]
  1208. type = StateTypeSet
  1209. trigger1 = HitOver
  1210. movetype = I
  1211.  
  1212. [State 5040, 5]
  1213. type = VelAdd
  1214. trigger1 = 1
  1215. y = GetHitVar(yaccel)
  1216.  
  1217. [State 5040, 6]
  1218. type = ChangeState
  1219. trigger1 = Vel Y > 0
  1220. trigger1 = Pos Y >= 0
  1221. value = 52 ;JUMPLAND
  1222.  
  1223. ;---------------------------------------------------------------------------
  1224. ; HITA_FALL (knocked up, falling)
  1225. [Statedef 5050]
  1226. type    = A
  1227. movetype= H
  1228. physics = N
  1229.  
  1230. [State 5050, 1] ;Change anim when done with transition
  1231. type = ChangeAnim
  1232. trigger1 = AnimTime = 0
  1233. trigger1 = Anim = 5035
  1234. trigger2 = Time = 0     ;If no transition anim
  1235. trigger2 = Anim != 5035
  1236. trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
  1237. trigger2 = Anim != 5090 ;Not if hit off ground anim
  1238. value = 5050
  1239.  
  1240. [State 5050, 2] ;Coming down anim
  1241. type = ChangeAnim
  1242. trigger1 = anim = [5050,5059]
  1243. trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
  1244. trigger1 = SelfAnimExist(anim+10)
  1245. value = anim+10
  1246. persistent = 0
  1247.  
  1248. [State 5050, 3] ;Gravity
  1249. type = VelAdd
  1250. trigger1 = 1
  1251. y = GetHitVar(yaccel)
  1252.  
  1253. [State 5050, 4] ;Recover near ground
  1254. type = ChangeState
  1255. triggerall = Vel Y > 0
  1256. triggerall = Pos Y >= -20
  1257. triggerall = alive
  1258. triggerall = CanRecover
  1259. trigger1 = Command = "recovery"
  1260. value = 5200 ;HITFALL_RECOVER
  1261.  
  1262. [State 5050, 5]; Recover in mid air
  1263. type = ChangeState
  1264. triggerall = Vel Y > -1
  1265. triggerall = alive
  1266. triggerall = CanRecover
  1267. trigger1 = Command = "recovery"
  1268. value = 5210 ;HITFALL_AIRRECOVER
  1269.  
  1270. [State 5050, 6]
  1271. type = ChangeState
  1272. trigger1 = Vel Y > 0
  1273. trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
  1274. value = 5100 ;HIT_BOUNCE
  1275.  
  1276. ;---------------------------------------------------------------------------
  1277. ; HIT_TRIP (shaking)
  1278. [Statedef 5070]
  1279. type    = A
  1280. movetype= H
  1281. physics = N
  1282. velset = 0,0
  1283.  
  1284. [State 5070, 1]
  1285. type = ChangeAnim
  1286. trigger1 = 1
  1287. value = 5070
  1288.  
  1289. [State 5070, 2]
  1290. type = ChangeState
  1291. trigger1 = HitShakeOver
  1292. value = 5071
  1293.  
  1294. [State 5070, 3]
  1295. type = ForceFeedback
  1296. trigger1 = time = 0
  1297. time = 12
  1298. waveform = sinesquare
  1299. ampl = 140
  1300.  
  1301. ;---------------------------------------------------------------------------
  1302. ; HIT_TRIP2 (fall through air)
  1303. [Statedef 5071]
  1304. type    = A
  1305. movetype= H
  1306. physics = N
  1307.  
  1308. [State 5071, 1]
  1309. type = HitVelSet
  1310. trigger1 = Time = 0
  1311. x = 1
  1312. y = 1
  1313.  
  1314. [State 5071, 2] ;Acceleration
  1315. type = VelAdd
  1316. trigger1 = 1
  1317. y = GetHitVar(yaccel)
  1318.  
  1319. [State 5071, 3] ;Hit ground
  1320. trigger1 = Vel Y > 0
  1321. trigger1 = Pos Y >= 15
  1322. type = ChangeState
  1323. value = 5110
  1324.  
  1325. ;---------------------------------------------------------------------------
  1326. ; HITL_SHAKE
  1327. [Statedef 5080]
  1328. type    = L
  1329. movetype= H
  1330. physics = N
  1331. velset = 0,0
  1332.  
  1333. [State 5080, 1] ;Set default anim
  1334. type = VarSet
  1335. trigger1 = time = 0
  1336. sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)
  1337.  
  1338. [State 5080, 2]
  1339. type = VarAdd
  1340. trigger1 = time = 0
  1341. trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
  1342. trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
  1343. sysvar(2) = anim % 10
  1344.  
  1345. [State 5080, 3] ;If 5090 doesn't exist, default to 5030
  1346. type = VarSet
  1347. trigger1 = time = 0
  1348. trigger1 = sysvar(2) = 5090
  1349. trigger1 = !SelfAnimExist(5090)
  1350. sysvar(2) = 5030
  1351.  
  1352. [State 5080, 3] ;Freeze
  1353. type = ChangeAnim
  1354. trigger1 = 1
  1355. value = sysvar(2)
  1356.  
  1357. [State 5080, 4]
  1358. type = ChangeState
  1359. trigger1 = HitShakeOver
  1360. trigger1 = GetHitVar(yvel) = 0
  1361. value = 5081 ;HITL_SLIDE
  1362.  
  1363. [State 5080, 5]
  1364. type = ChangeState
  1365. trigger1 = HitShakeOver
  1366. trigger1 = GetHitVar(yvel) != 0
  1367. value = 5030 ;HITA_UP
  1368.  
  1369. ;---------------------------------------------------------------------------
  1370. ; HITL_SLIDE
  1371. [Statedef 5081]
  1372. type    = L
  1373. movetype= H
  1374. physics = C
  1375.  
  1376. [State 5081, 1]
  1377. type = HitVelSet
  1378. trigger1 = Time = 0
  1379. x = 1
  1380.  
  1381. [State 5081, 2]
  1382. type = VelSet
  1383. trigger1 = HitOver
  1384. x = 0
  1385.  
  1386. [State 5081, 3] ;Don't show hit ground frame
  1387. type = VarSet
  1388. trigger1 = Time = 0
  1389. sysvar(0) = 1
  1390.  
  1391. [State 5081, 4]
  1392. type = ChangeState
  1393. trigger1 = HitOver
  1394. value = 5110 ;HIT_LIEDOWN
  1395.  
  1396. ;---------------------------------------------------------------------------
  1397. ; HIT_BOUNCE (hit ground)
  1398. [Statedef 5100]
  1399. type    = L
  1400. movetype= H
  1401. physics = N
  1402.  
  1403. [State 5100, 1]
  1404. type = VelSet
  1405. trigger1 = Time = 0
  1406. trigger1 = GetHitVar(fall.yvel) = 0
  1407. trigger1 = vel x > 1
  1408. x = 1
  1409.  
  1410. [State 5100, EnvShake]
  1411. type = FallEnvShake
  1412. trigger1 = Time = 0
  1413.  
  1414. [State 5100, Var] ;Save fall velocity
  1415. type = VarSet
  1416. trigger1 = Time = 0
  1417. ;trigger1 = GetHitVar(fall.yvel) = 0
  1418. sysvar(1) = floor(vel y)
  1419.  
  1420. [State 5100, 2] ;Hit ground anim (normal)
  1421. type = ChangeAnim
  1422. triggerall = time = 0
  1423. trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
  1424. trigger2 = !SelfAnimExist(5100 + (anim % 10))
  1425. value = 5100
  1426.  
  1427. [State 5100, 3] ;Hit ground anim (for hit up)
  1428. type = ChangeAnim
  1429. trigger1 = time = 0
  1430. trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
  1431. trigger1 = SelfAnimExist(5100 + (anim % 10))
  1432. value = 5100 + (anim % 10)
  1433.  
  1434. [State 5100, 4]
  1435. type = PosSet
  1436. trigger1 = Time = 0
  1437. y = 0
  1438.  
  1439. [State 5100, 5]
  1440. type = VelSet
  1441. trigger1 = Time = 0
  1442. y = 0
  1443.  
  1444. [State 5100, 6] ;Reduce speed
  1445. type = VelMul
  1446. trigger1 = Time = 0
  1447. x = 0.75
  1448.  
  1449. [State 5100, 7]
  1450. type = ChangeState
  1451. trigger1 = Time = 0
  1452. trigger1 = GetHitVar(fall.yvel) = 0
  1453. value = 5110 ;HIT_LIEDOWN
  1454.  
  1455. [State 5100, 8]
  1456. type = GameMakeAnim
  1457. trigger1 = Time = 1
  1458. ;value = 61
  1459. ;pos = 0, 0
  1460. ;under = 1
  1461. value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
  1462. pos = 0, 0
  1463. under = sysvar(1) <= 10
  1464.  
  1465. [State 5100, 9]
  1466. type = HitFallDamage
  1467. trigger1 = Time = 3
  1468.  
  1469. [State 5100, 10]
  1470. type = PlaySnd
  1471. trigger1 = Time = 1
  1472. ;value = F7, 0 ;Hit ground
  1473. value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)
  1474.  
  1475. [State 5100, 11]
  1476. type = PosFreeze
  1477. trigger1 = 1
  1478.  
  1479. [State 5100, 12]
  1480. type = ChangeState
  1481. trigger1 = AnimTime = 0
  1482. value = 5101
  1483.  
  1484. [State 5100, 13]
  1485. type = ForceFeedback
  1486. trigger1 = Time = 0
  1487. waveform = sinesquare
  1488. ampl = 128,-3,-.2,.005
  1489. time = 20
  1490.  
  1491. ;---------------------------------------------------------------------------
  1492. ; HIT_BOUNCE (bounce into air)
  1493. [Statedef 5101]
  1494. type    = L
  1495. movetype= H
  1496. physics = N
  1497.  
  1498. [State 5101, 1] ;Coming hit ground anim (normal)
  1499. type = ChangeAnim
  1500. triggerall = time = 0
  1501. trigger1 = anim != [5101,5109]
  1502. trigger2 = !SelfAnimExist(5160 + (anim % 10))
  1503. value = 5160
  1504.  
  1505. [State 5101, 2] ;Coming hit ground anim (for hit up)
  1506. type = ChangeAnim
  1507. triggerall = time = 0
  1508. trigger1 = anim = [5101,5109]
  1509. trigger1 = SelfAnimExist(5160 + (anim % 10))
  1510. value = 5160 + (anim % 10)
  1511.  
  1512. [State 5101, 3]
  1513. type = HitFallVel
  1514. trigger1 = Time = 0
  1515.  
  1516. [State 5101, 4]
  1517. type = PosSet
  1518. trigger1 = Time = 0
  1519. y = 20
  1520.  
  1521. [State 5101, 5] ;Acceleration
  1522. type = VelAdd
  1523. trigger1 = 1
  1524. y = .4
  1525.  
  1526. [State 5101, 6] ;Hit ground
  1527. trigger1 = Vel Y > 0
  1528. trigger1 = Pos Y >= 12
  1529. type = ChangeState
  1530. value = 5110
  1531.  
  1532. ;---------------------------------------------------------------------------
  1533. ; HIT_LIEDOWN
  1534. [Statedef 5110]
  1535. type    = L
  1536. movetype= H
  1537. physics = N
  1538.  
  1539. [State 5110, EnvShake]
  1540. type = FallEnvShake
  1541. trigger1 = Time = 0
  1542.  
  1543. [State 5110, 1] ;For hit up/up-diag type (from state 5081)
  1544. type = ChangeAnim
  1545. persistent = 0
  1546. trigger1 = SelfAnimExist(5110 + (anim % 10))
  1547. trigger1 = anim = [5081,5089]
  1548. value = 5110 + (anim % 10)
  1549.  
  1550. [State 5110, 2] ;Hit ground anim (normal)
  1551. type = ChangeAnim
  1552. triggerall = time = 0
  1553. triggerall = anim != [5110,5119] ;Not already changed anim
  1554. trigger1 = anim != [5161,5169]
  1555. trigger2 = !SelfAnimExist(5170 + (anim % 10))
  1556. value = 5170
  1557.  
  1558. [State 5110, 3] ;Hit ground anim (for hit up)
  1559. type = ChangeAnim
  1560. triggerall = time = 0
  1561. triggerall = anim != [5110,5119] ;Not already changed anim
  1562. trigger1 = anim = [5161,5169]
  1563. trigger1 = SelfAnimExist(5170 + (anim % 10))
  1564. value = 5170 + (anim % 10)
  1565.  
  1566. [State 5110, 4]
  1567. type = HitFallDamage
  1568. trigger1 = Time = 0
  1569.  
  1570. [State 5110, 5]
  1571. type = PosSet
  1572. trigger1 = Time = 0
  1573. y = 0
  1574.  
  1575. [State 5110, Var] ;Get fall velocity
  1576. type = VarSet
  1577. trigger1 = Time = 0
  1578. trigger1 = GetHitVar(fall.yvel) != 0
  1579. sysvar(1) = floor(vel y)
  1580.  
  1581. [State 5110, 6]
  1582. type = PlaySnd
  1583. trigger1 = Time = 0
  1584. trigger1 = !SysVar(0)
  1585. ;value = F7, 0 ;Hit ground
  1586. value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)
  1587.  
  1588. [State 5110, 7]
  1589. type = GameMakeAnim
  1590. trigger1 = Time = 0
  1591. trigger1 = !SysVar(0)
  1592. value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
  1593. pos = 0, 0
  1594. under = sysvar(1) <= 10
  1595.  
  1596. [State 5110, 8]
  1597. type = VelSet
  1598. trigger1 = Time = 0
  1599. y = 0
  1600.  
  1601. [State 5110, 9] ;For hit up type
  1602. type = ChangeAnim
  1603. persistent = 0
  1604. triggerall = anim = [5171,5179]
  1605. triggerall = SelfAnimExist(5110 + (anim % 10))
  1606. trigger1 = AnimTime = 0
  1607. trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
  1608. value = 5110 + (anim % 10)
  1609.  
  1610. [State 5110, 10] ;For normal
  1611. type = ChangeAnim
  1612. persistent = 0
  1613. triggerall = Anim != [5111,5119]
  1614. trigger1 = AnimTime = 0
  1615. trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
  1616. value = 5110
  1617.  
  1618. [State 5110, 11] ;If just died
  1619. type = ChangeState
  1620. triggerall = !alive
  1621. trigger1 = AnimTime = 0
  1622. trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
  1623. trigger3 = Anim = [5110,5119]
  1624. value = 5150
  1625.  
  1626. [State 5110, 12]
  1627. type = VarSet
  1628. trigger1 = SysVar(0)
  1629. trigger1 = Time = 0
  1630. sysvar(0) = 0
  1631.  
  1632. [State 5110, 13] ;Friction
  1633. type = VelMul
  1634. trigger1 = 1
  1635. x = 0.85
  1636.  
  1637. [State 5110, 14]
  1638. type = ForceFeedback
  1639. trigger1 = alive
  1640. trigger1 = Time = 0
  1641. time = 8
  1642. ampl = 240
  1643. waveform = sine
  1644.  
  1645. [State 5110, 15]
  1646. type = ForceFeedback
  1647. trigger1 = !alive
  1648. trigger1 = Time = 0
  1649. ampl = 200, 7, -.467
  1650. time = 30
  1651. waveform = sine
  1652.  
  1653. ;---------------------------------------------------------------------------
  1654. ; HIT_GETUP
  1655. [Statedef 5120]
  1656. type    = L
  1657. movetype= I
  1658. physics = N
  1659.  
  1660. [State 5120, 1a] ;Get up anim (normal)
  1661. type = ChangeAnim
  1662. triggerall = time = 0
  1663. trigger1 = anim != [5111,5119]
  1664. trigger2 = !SelfAnimExist(5120 + (anim % 10))
  1665. value = 5120
  1666.  
  1667. [State 5120, 1b] ;Get up anim (for hit up/diag-up)
  1668. type = ChangeAnim
  1669. triggerall = time = 0
  1670. trigger1 = anim = [5111,5119]
  1671. trigger1 = SelfAnimExist(5120 + (anim % 10))
  1672. value = 5120 + (anim % 10)
  1673.  
  1674. [State 5120, 2]
  1675. type = VelSet
  1676. trigger1 = Time = 0
  1677. x = 0
  1678.  
  1679. [State 5120, 3]
  1680. type = NotHitBy
  1681. trigger1 = 1
  1682. value = SCA
  1683. time = 1
  1684.  
  1685. [State 5120, 4]
  1686. type = HitFallSet
  1687. trigger1 = AnimTime = 0
  1688. value = 1
  1689.  
  1690. [State 5120, 5] ;Can't be thrown right after getting up
  1691. type = NotHitBy
  1692. trigger1 = AnimTime = 0
  1693. value = , NT,ST,HT
  1694. time = 12
  1695.  
  1696. [State 5120, 6] ;Can't be hit right after getting up (short time)
  1697. type = NotHitBy
  1698. trigger1 = AnimTime = 0
  1699. value2 = SCA
  1700. time = 3
  1701.  
  1702. [State 5120, 7]
  1703. type = ChangeState
  1704. trigger1 = AnimTime = 0
  1705. value = 0
  1706. ctrl = 1
  1707.  
  1708. ;---------------------------------------------------------------------------
  1709. ; HIT_LIEDEAD
  1710. [Statedef 5150]
  1711. type    = L
  1712. movetype= H
  1713. physics = N
  1714. sprpriority = -3
  1715.  
  1716. [State 5150, 1] ;Normal anim
  1717. type = ChangeAnim
  1718. triggerall = Time = 0
  1719. triggerall = SelfAnimExist(5140)
  1720. trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
  1721. trigger2 = !SelfAnimExist(5140 + (anim % 10))
  1722. value = 5140
  1723.  
  1724. [State 5150, 3] ;Hit up type anim
  1725. type = ChangeAnim
  1726. trigger1 = Time = 0
  1727. trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
  1728. trigger1 = SelfAnimExist(5140 + (anim % 10))
  1729. value = 5140 + (anim % 10)
  1730.  
  1731. [State 5150, 4] ;Match over anim
  1732. type = ChangeAnim
  1733. persistent = 0
  1734. ;trigger1 = Time = 0
  1735. trigger1 = MatchOver = 1
  1736. trigger1 = Anim = [5140,5149]
  1737. trigger1 = SelfAnimExist(anim+10)
  1738. value = anim+10
  1739.  
  1740. [State 5150, 5] ;Switch to 5110 if liedead anim does not exist
  1741. type = ChangeAnim
  1742. trigger1 = Time = 0
  1743. trigger1 = Anim != [5140,5159]
  1744. trigger1 = Anim != [5110,5119]
  1745. value = 5110
  1746.  
  1747. [State 5150, 6] ;Friction
  1748. type = VelMul
  1749. trigger1 = 1
  1750. x = 0.85
  1751.  
  1752. [State 5150, 7] ;Friction
  1753. type = VelSet
  1754. trigger1 = Vel x < .05
  1755. persistent = 0
  1756. x = 0
  1757.  
  1758. [State 5150, 8]
  1759. type = NotHitBy
  1760. trigger1 = 1
  1761. value = SCA
  1762. time = 1
  1763.  
  1764. ;---------------------------------------------------------------------------
  1765. ; HIT_FALLRECOVER (still falling)
  1766. [Statedef 5200]
  1767. type    = A
  1768. movetype= H
  1769. physics = N
  1770.  
  1771. [State 5200, 1] ;Change anim if done with transition
  1772. type = ChangeAnim
  1773. trigger1 = Anim = 5035
  1774. trigger1 = AnimTime = 0
  1775. value = 5050
  1776.  
  1777. [State 5200, 2]
  1778. type = VelAdd
  1779. trigger1 = 1
  1780. y = GetHitVar(yaccel)
  1781.  
  1782. [State 5200, 3]
  1783. type = SelfState
  1784. trigger1 = Vel Y > 0
  1785. trigger1 = Pos Y >= 10
  1786. value = 5201
  1787.  
  1788. ;---------------------------------------------------------------------------
  1789. ; HIT_FALLRECOVER (on the ground)
  1790. [Statedef 5201]
  1791. type    = A
  1792. movetype= H
  1793. physics = A
  1794. anim = 5200
  1795.  
  1796. [State 5201, 1] ;Turn if not facing opponent
  1797. type = Turn
  1798. trigger1 = Time = 0
  1799. trigger1 = p2dist X < -5
  1800.  
  1801. [State 5201, 2]
  1802. type = VelSet
  1803. trigger1 = Time = 0
  1804. x = -.15
  1805. y = -3.5
  1806.  
  1807. [State 5201, 3]
  1808. type = PosSet
  1809. trigger1 = Time = 0
  1810. y = 0
  1811.  
  1812. [State 5201, 4]
  1813. type = NotHitBy
  1814. trigger1 = 1
  1815. value = SCA
  1816. time = 1
  1817.  
  1818. [State 5201, 5] ;Blink white
  1819. type = PalFX
  1820. trigger1 = Time = 0
  1821. time = 3
  1822. add = 128,128,128 ;256,256,256
  1823.  
  1824. [State 5201, 6]
  1825. type = GameMakeAnim
  1826. trigger1 = Time = 1
  1827. value = 60
  1828. pos = 0, 0
  1829. under = 1
  1830.  
  1831. ;---------------------------------------------------------------------------
  1832. ; HIT_AIRFALLRECOVER
  1833. [Statedef 5210]
  1834. type    = A
  1835. movetype= I
  1836. physics = N
  1837. anim = 5210
  1838. ctrl = 0
  1839.  
  1840. [State 5210, 1] ;Blink white
  1841. type = PalFX
  1842. trigger1 = Time = 0
  1843. time = 3
  1844. add = 128,128,128 ;256,256,256
  1845.  
  1846. [State 5210, 1]
  1847. type = PosFreeze
  1848. trigger1 = Time = 0
  1849. value = 4
  1850.  
  1851. [State 5210, 2] ;Turn if not facing opponent
  1852. type = Turn
  1853. trigger1 = Time = 0
  1854. trigger1 = p2dist X < -20
  1855.  
  1856. [State 5210, 1]
  1857. type = VelMul
  1858. trigger1 = Time = 4
  1859. x = .8
  1860. y = .8
  1861.  
  1862. [State 5210, 1]
  1863. type = VelAdd
  1864. trigger1 = Time = 4
  1865. y = -4.5
  1866.  
  1867. [State 5210, 1]
  1868. type = VelMul
  1869. trigger1 = Time = 4
  1870. trigger1 = Vel Y > 0
  1871. y = .5
  1872.  
  1873. [State 5210, 1]
  1874. type = VelAdd
  1875. trigger1 = Time = 4
  1876. trigger1 = Vel Y > -3
  1877. y = -2
  1878.  
  1879. [State 5210, 1]
  1880. type = VelAdd
  1881. trigger1 = Time = 4
  1882. trigger1 = Vel Y > -2
  1883. y = -1
  1884.  
  1885. [State 5210, 2] ;Go up
  1886. type = VelAdd
  1887. trigger1 = Time = 4
  1888. trigger1 = Command = "holdup"
  1889. y = -2
  1890.  
  1891. [State 5210, 2] ;Go down
  1892. type = VelAdd
  1893. trigger1 = Time = 4
  1894. trigger1 = Command = "holddown"
  1895. y = 1.5
  1896.  
  1897. [State 5210, 2] ;Go fwd
  1898. type = VelMul
  1899. trigger1 = Time = 4
  1900. trigger1 = Command = "holdfwd"
  1901. x = 1
  1902.  
  1903. [State 5210, 2] ;Go back
  1904. type = VelAdd
  1905. trigger1 = Time = 4
  1906. trigger1 = Command = "holdback"
  1907. x = -1
  1908.  
  1909. [State 5210, 3]
  1910. type = NotHitBy
  1911. trigger1 = Time = 0
  1912. value = SCA
  1913. time = 15
  1914.  
  1915. [State 5210, 4]
  1916. type = CtrlSet
  1917. trigger1 = Time = 20
  1918. value = 1
  1919.  
  1920. [State 5210, 5]
  1921. type = VelAdd;Gravity
  1922. trigger1 = Time >= 4
  1923. y = .35
  1924.  
  1925. [State 5210, 5] ;Land on ground
  1926. type = ChangeState
  1927. trigger1 = Vel Y > 0
  1928. trigger1 = Pos Y >= 0
  1929. value = 52 ;JUMP_LAND
  1930. ctrl = 1
  1931.  
  1932. ;---------------------------------------------------------------------------
  1933. ; Continue?
  1934. [Statedef 5500]
  1935. type = S
  1936. ctrl = 0
  1937. anim = 5300
  1938. velset = 0,0
  1939.  
  1940. [State 5500, 1] ;Use continue animation if available
  1941. type = ChangeAnim
  1942. trigger1 = time = 0
  1943. trigger1 = SelfAnimExist(5500)
  1944. value = 5500
  1945.  
  1946. ;---------------------------------------------------------------------------
  1947. ; Initialize (at the start of the round)
  1948. [Statedef 5900]
  1949. type = S
  1950.  
  1951. [State 5900, 1] ;Clear all int variables
  1952. type = VarRangeSet
  1953. trigger1 = roundno = 1
  1954. value = 0
  1955.  
  1956. [State 5900, 2] ;Clear all float variables
  1957. type = VarRangeSet
  1958. trigger1 = roundno = 1
  1959. fvalue = 0
  1960.  
  1961. [State 5900, 3] ;Intro
  1962. type = ChangeState
  1963. trigger1 = roundno = 1
  1964. value = 190
  1965.  
  1966. [Statedef -3]
  1967. [state -3, nolifebar]
  1968. type = assertspecial
  1969. trigger1 = roundstate != 2
  1970. flag = NoBarDisplay
  1971.  
  1972. [State -3, Perfect]
  1973. type = Explod
  1974. trigger1 = WinPerfect
  1975. trigger1 = numexplod(131) = 0
  1976. anim = F75
  1977. id = 75
  1978. pos = 60, 50
  1979. postype = left
  1980. sprpriority = 5
  1981. bindtime = -1
  1982. ---------------------------------------------------------------------------
  1983. ;---------------------------------------------------------------------------
  1984. ;---------------------------------------------------------------------------
  1985. ;---------------------------------------------------------------------------
  1986. ;---------------------------------------------------------------------------
  1987. ;---------------------------------------------------------------------------
  1988. ;---------------------------------------------------------------------------
  1989. ;-----------------------------------
  1990.  
  1991.