YesNoOk
avatar

Another Cornerpush code (Read 10336 times)

Started by Manson Rees, July 20, 2018, 07:26:14 am
Share this topic:
Another Cornerpush code
#1  July 20, 2018, 07:26:14 am
  • **
  • Sr. Símio Enfermo
    • Brazil
    • www.facebook.com/people/Manson-Rees/100027897993934
I was trying to implement a cornerpush system for my own in a WIP, using the minimal set of variables possible... Just for the challenge.  :lol:

First of all, put this line in every hitdef:
Code:
ground.cornerpush.veloff = 0

Just this line is really necessary, for more information just click in this spoiler \/
Spoiler, click to toggle visibilty

This goes before any Pause or SuperPause SCTRL (generally on Super states):
Code:
[State 3000, Explod]
type = Explod
trigger1 = *SAME_CONDITIONS*
anim = *BLANK_ANIM*
ID = 97413000
postype = p1 
removetime = 2 ; <= Don't change this value.

[State 3000, Super A]
type = SuperPause
trigger1 = *SAME_CONDITIONS*
(...)

And finally, in StateNo -2
Code:
[State -2, Null]
type = Null
trigger1 = NumTarget && StateType!= A
trigger1 = !(Target, HitShakeOver)
trigger1 = var(40):= 10
trigger2 = var(40):= (var(40) - (var(40) > 0))
ignorehitpause = 1

[State -2, PosAdd]
type = PosAdd
triggerall = NumTarget && StateType!= A && !NumExplod(97413000)
triggerall = StateNo!= [800,899] ; Throws
trigger1 = Target, HitShakeOver && var(40)
trigger1 = Target, BackEdgeBodyDist<= 0 || Target, FrontEdgeBodyDist<= 0
trigger1 = !(Target, StateType = A || Target, StateType = L)
x = Target, GetHitVar(xVel) * Target, Facing * var(40) * .1
ignorehitpause = 1


That's it.
If you find any bugs, please report it here. :)

Last Edit: July 20, 2018, 07:32:12 am by Manson Rees