Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. //This chunk of code is to replace spindash, and to be an instantaneous event.
  2. addHook("ThinkFrame", do
  3. for player in players.iterate
  4. if (player.mo and player.mo.skin == "testchar") //if you're test, the original undesigned hedgehog*
  5. if (player.speed == 0) //if you're a rock and you're doing nothing
  6. if (player.cmd.buttons & BT_USE) //if you press the speen butten
  7. and not (player.pflags & PF_SPINNING) //and you actually start spinning (this exists so that you don't repeatedly use this action)
  8. and (P_IsObjectOnGround(player.mo)) //and you're on the ground
  9. and not (player.pflags & PF_STARTDASH) //and you just started your spindash
  10. //and (player.mo.charge == nil) //Sets the ability value to nil so it can be used.
  11. and not (player.weapondelay)
  12. if (player.speed > 50)
  13. and (player.mo.charge == nil)
  14. and not (player.pflags & PF_JUMPED)
  15. player.charability = CA_GLIDEANDCLIMB
  16. else
  17. player.charability = CA_THOK
  18. end
  19. P_InstaThrust(player.mo, player.mo.angle, 60*FRACUNIT) //MOVING AROUND AT THE SPEED OF FAST (instant charge)
  20. S_StartSound(player.mo, sfx_zoom) //ZOOOOOOM (sound effect)
  21. P_SpawnGhostMobj(player.mo) //afterimage!!!!!!!!! (...that)
  22. //player.pflags = $1 & ~MF_SHOOTABLE //I can do anything~
  23. player.mo.state = S_PLAY_SPD1 //GOTTA GO FAST (run frames)
  24. //player.mo.charge = 1 //Sets the value to 1 so it can't be used again until...
  25. player.weapondelay = 3*TICRATE
  26. end
  27. //player.mo.charge = nil //...three seconds have passed, at which point the ability becomes usable again.
  28. end
  29. end
  30. end
  31. end)
  32.  
  33. //* = total bullshit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement