Is there any way to prevent the player from shooting the normal red ring?

Status
Not open for further replies.

amperbee

thunderdome denizen
Retired Staff
I'm making a Lua script that modifies the behaviour of the weapon rings.
Well, I want to basically disable the red ring.
I know there is no variable that will make that happen, but I thought about making it work in different ways.

I thought about the player hovering the red ring weapon. If that is the only weapon this player has, then the weapon delay will be set to a non zero value, making the weapon unusable.
If the player has any other weapon and the player selects the red ring, if the player was (for example) selecting the automatic ring, it will cycle back to the rail ring.
But the problem resides in that there's a button to shoot the normal ring, and I don't know for a way to prevent the player from shooting the red ring. What can I do?
 
I guess you can set player.weapondelay to be anything above 0 if the current weapon is the red ring. The player can't shoot until it falls to 0.

However, I'm not sure about how to prevent Fire Normal from doing anything though

EDIT: Actually you could try to remove BT_FIRENORMAL from player.cmd.buttons at every tic to prevent that from happening. I can't guarantee it'll work, but it's worth trying I guess
 
Last edited:
I guess you can set player.weapondelay to be anything above 0 if the current weapon is the red ring. The player can't shoot until it falls to 0.
Yeah, that's what I have planned doing. It works!

Actually you could try to remove BT_FIRENORMAL from player.cmd.buttons at every tic to prevent that from happening. I can't guarantee it'll work, but it's worth trying I guess
I tried that but it doesn't work.

I could try deleting the ring that the player shot, but I don't know how can I do that in the same tic where the player pressed the ring toss button, as to prevent melee-range damage.
 
Last edited:
What about replacing the red ring with an object that doesn't even deal damage, and despawns in a tic, giving the player a ring back in the process?
 
What about replacing the red ring with an object that doesn't even deal damage, and despawns in a tic, giving the player a ring back in the process?

I don't know how to create objects, unfortunately.
 
If you're trying to get rid of the red ring altogether, you could just set "mobjinfo[MT_REDRING].spawnstate = S_NULL". This will make the red ring disappear as soon as it spawns. Granted, I haven't tested this, so I don't know for sure that it will work.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top