Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //H HIT MEANS HORIZONTAL HIT
- //V HIT MEANS VERTICAL HIT
- //DUMMY OBJECT STEP EVENT
- hitbox.x=x-5
- hitbox.y=y
- if vsp < (maxVsp/global.slowmo)
- vsp+=(grav)*global.slowmo;
- else vsp=maxVsp;
- if place_meeting(x,y+vsp,o_solid)
- {
- while !place_meeting(x,y+sign(vsp),o_solid)
- {
- y+=sign(vsp);
- }
- vsp=0;
- if stat=COMBO and vHit=true{
- vHit=true
- grav=1
- sprite_index=spr_Dummy
- stat=IDLE
- }
- if stat=COMBO and hFinish=true{
- hFinish=false
- grav=1
- sprite_index=spr_Dummy
- stat=IDLE
- }
- }
- y+=(vsp);
- #region UNRELATED (I GUESS)
- if hHit=true
- {
- x+=hspHit
- hspHit-=0.5
- hFinish=false
- hHitTimer++
- if hHitTimer>hitFrames
- {
- hFinish=true
- hspHit=6
- hHit=false
- hitForce=4
- hHitTimer=0
- }
- }
- #endregion
- with o_hurtbox
- {
- switch (o_hurtbox.atckType) {
- case N_FIST:
- if place_meeting(x, y, o_dummy.hitbox)
- {
- with(o_dummy){get_hit(10,spr_DummyHit,true,false,2,2,false,0.5*30,30);}
- }
- break;///////////////////////////////////
- }
- }
- //DUMMY OBJECT END STEP EVENT
- punchHit=clamp(punchHit,18,20)
- hspHit=clamp(hspHit,0,9999)
- if stat=HIT{
- timerToComboChance++
- var framesComboChance=30
- if timerToComboChance>framesComboChance
- {
- stat=COMBO
- }
- }
- //get_hit(); FUNCTION
- function get_hit(hitFps,spriteToShow,vertical,horizontal,hForce,vForce,slomo=false,slomotime=0.5*30,slomoslow=30)
- {
- if stat!=HIT{
- o_fightPlayer.depth=depth-30
- if slomo=true
- {
- slowmo(slomotime,slomoslow)
- }
- if vertical=true{
- vHit=true
- vsp-=(jumpForce*vForce)}
- if horizontal=true{
- hHit=true
- hspHit=hitForce+hForce}
- show_debug_message("HEYYYY")
- hitFrames=hitFps
- if stat!=COMBO{
- stat=HIT}
- }
- if stat=HIT
- {
- sprite_index=spriteToShow
- }
- }
Add Comment
Please, Sign In to add comment