CandyCaine151
Member
I have a script (credit to Shock for it) that allows me to shoot a gun my character is equipped with and I have some questions related to the script.
1. How do I switch sprites and start losing momentum when I shoot
2. When I become super I wanna make this like a minigun instead of a pistol
3. I just thought of an idea where I have 10 bullets and every 5 seconds I regain 1 bullet. I wanna show on a HUD but I don't know how to make a custom HUD X_X
The Shooting Script:
addHook("ThinkFrame", do
for player in players.iterate
if player.mo and player.mo.skin == "bob"
if not (player.mo.fire)
player.mo.fire = 0
end
if not (player.powers[pw_carry] == CR_NIGHTSMODE)
and not (player.powers[pw_carry])
and not (player.pflags & PF_STASIS)
and not (player.mo.tracer and player.mo.tracer.type == MT_TUBEWAYPOINT)
and not (player.mo.state == S_PLAY_SUPER_TRANS1)
and not (player.mo.state == S_PLAY_SUPER_TRANS2)
and not (player.mo.state == S_PLAY_SUPER_TRANS3)
and not (player.mo.state == S_PLAY_SUPER_TRANS4)
and not (player.mo.state == S_PLAY_SUPER_TRANS5)
and not (player.mo.state == S_PLAY_SUPER_TRANS6)
and not (player.pflags & PF_FINISHED)
and P_PlayerInPain(player) == false
and player.playerstate == PST_LIVE
and (player.cmd.buttons & BT_CUSTOM1)
and player.mo.fire == 0
player.mo.fire = 1
local flame = P_SpawnPlayerMissile(player.mo, MT_CORK)
end
if not (player.cmd.buttons & BT_CUSTOM1)
player.mo.fire = 0
end
end
end
end)
1. How do I switch sprites and start losing momentum when I shoot
2. When I become super I wanna make this like a minigun instead of a pistol
3. I just thought of an idea where I have 10 bullets and every 5 seconds I regain 1 bullet. I wanna show on a HUD but I don't know how to make a custom HUD X_X
Last edited: