addHook("ThinkFrame", do for player in players.iterate // only Robo-Hood gets to shoot arrows! if (player.mo and player.mo.skin == "robo-hood") //check if "use" (aka spin) is pressed if (player.cmd.buttons & BT_USE) and (player.pflags & PF_USEDOWN) if not (((player.cmd.buttons & BT_ATTACK) or (player.cmd.buttons & BT_FIRENORMAL)) and (player.pflags & PF_ATTACKDOWN)) //noope, no firing rings at the same time :E and not (player.weapondelay) //no shooting when weapondelay hasn't gone back to 0 yet and not (player.pflags & PF_NIGHTSMODE) //no shooting when NiGHTS Super Sonic! and not (player.pflags & PF_ROPEHANG) //rope hangs use spin for letting go and not (player.pflags & PF_MACESPIN) //control chains use spin for shifting angle I think? and not (player.pflags & PF_TAGGED) //no shooting when tagged and not (player.pflags & PF_STASIS) //no shooting when in stasis in tag mode either and not (player.mo.tracer and player.mo.tracer.type == MT_TUBEWAYPOINT) //no shooting when following a zoomtube and not (player.pflags & PF_SPINNING) //no shooting when ...spinning? // fire away! local th = P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z + player.mo.height/2, MT_ARROW) // missiles can't hurt their targets, note th.target = player.mo local an = player.mo.angle local slope = player.aiming local speed = th.info.speed if player.mo.eflags & MFE_VERTICALFLIP th.flags2 = $1|MF2_OBJECTFLIP // flip gravity! th.z = $1 - th.height // remove your own height so this matches normal gravity setup end th.angle = an th.momx = FixedMul(speed, cos(an)) th.momy = FixedMul(speed, sin(an)) th.momx = FixedMul(th.momx, cos(slope)) th.momy = FixedMul(th.momy, cos(slope)) th.momz = FixedMul(speed, sin(slope)) player.weapondelay = TICRATE //hah, you can fire these only 1/4 as frequently as regular rings! end end //1.5x thok power when player gets Super Sneakers! if (player.powers[pw_sneakers] > 0) player.actionspd = 45*FRACUNIT else //normal power player.actionspd = 30*FRACUNIT end end end end)