[SBARINFO] "underwater" sub-block

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [SBARINFO] "underwater" sub-block

Re: [SBARINFO] "underwater" sub-block

by MG_Man » Wed Nov 25, 2009 4:56 pm

Xaser wrote:Hmm, I normally don't condone bumping of suggestion threads, but I'm bringing this to light again now that the SBARINFO rewrite is done-ish.

I tried to go ahead and implement an AirTime counter in Psychic's numbers-only minimal-HUD when I realized that because of the way things work, the AirTime counter would always be displayed, which looks pretty silly telling you there's still 20 seconds worth of air left even when you're above water. :P

Basically, without a way to check if the player's actually underwater or not, I can't see the AirTime counter getting much use, leaving the feature a bit crippled in its current state.
Perhaps you can have a sub-block appear only when the airtime is less than the max?

Judging on how the number differs per map I don't think this would be as reliable though, but it's a start.

Re: [SBARINFO] "underwater" sub-block

by Xaser » Mon Nov 09, 2009 11:03 am

Hmm, I normally don't condone bumping of suggestion threads, but I'm bringing this to light again now that the SBARINFO rewrite is done-ish.

I tried to go ahead and implement an AirTime counter in Psychic's numbers-only minimal-HUD when I realized that because of the way things work, the AirTime counter would always be displayed, which looks pretty silly telling you there's still 20 seconds worth of air left even when you're above water. :P

Basically, without a way to check if the player's actually underwater or not, I can't see the AirTime counter getting much use, leaving the feature a bit crippled in its current state.

Re: [SBARINFO] "underwater" sub-block

by Xaser » Sun Jun 28, 2009 5:43 pm

The Slimeinator wrote:What about for a flamethrower weapon that cannot be used underwater? :D
I've used the method XutaWoo posted to do just that. You just can't check for this with SBARINFO and that's the reason this suggestion's here.

Re: [SBARINFO] "underwater" sub-block

by XutaWoo » Sun Jun 28, 2009 10:13 am

Weapons are inventory items.

I probally should've explained better; checks with items that are in a player's inventory call the player's value, so as long as you're not doing something silly like putting it in the Spawn state, it'd jump if the player was underwater.

Re: [SBARINFO] "underwater" sub-block

by The Slimeinator » Sun Jun 28, 2009 10:09 am

What about for a flamethrower weapon that cannot be used underwater? :D

Re: [SBARINFO] "underwater" sub-block

by XutaWoo » Sun Jun 28, 2009 9:38 am

Code: Select all

A_JumpIf(waterlevel > 2, "Use2")
There you go.

No, seriously, that will work.

In the pickup and use states and states that follow them, anyway. But I can't think of a use for a inventory item to check for a player's water level except in those conditions.

Re: [SBARINFO] "underwater" sub-block

by The Slimeinator » Sun Jun 28, 2009 9:21 am

I don't think this would be useful as far as SBARINFO goes, but instead as an "inventory" function. For example, an extension to A_JumpIf.

Such as, in a CustomInventory item:

A_JumpIf(playerwaterlevel > 2, "Use2")

And then the item would jump to a state and then carry out its function that changes or could only work while underwater.

[SBARINFO] "underwater" sub-block

by Setzer » Sat Jun 13, 2009 12:28 pm

Though the new AirTime counter is lovley, at the moment there is no way to check whether the player is actively underwater or not. A special type of sub-block that executes when underwater would be very handy.

I can see someone using this to emulate Duke 3D's scuba tank effect, among other things.

Top