[DECORATE] Underwater options

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: [DECORATE] Underwater options

Re: [DECORATE] Underwater options

by David Ferstat » Fri Sep 04, 2009 7:54 pm

Sorry for the bump, but I think Graf missed my question.:

Graf, what's involved in exposing SINK_SPEED to ACS?

Re: [DECORATE] Underwater options

by David Ferstat » Wed Aug 19, 2009 10:30 am

Graf Zahl wrote:
Cutmanmike wrote:Actually that's a good idea, but how does gravity work underwater right now? I.e if I dropped an imp in the water he wouldn't sink to the bottom would he?

It doesn't use gravity but a different (hardcoded) value called SINK_SPEED.
Graf, what's involved in exposing SINK_SPEED to ACS?

Re: [DECORATE] Underwater options

by Daniel » Thu Aug 13, 2009 7:45 am

Yes, but the problem is if we make this on monsters, A_JumpIf should be used every time; it will interrupt the monster activity for sure. For barrels it is quite easy. Thanks for the tip anyway.

Re: [DECORATE] Underwater options

by CaptainToenail » Wed Aug 12, 2009 2:33 am

Are you trying to make objects such as boxes and barrels float in water? If so, you could use ThrustThingZ in combination with A_JumpIf(waterlevel and possibly A_Stop when it reaches the surface

Re: [DECORATE] Underwater options

by Daniel » Tue Aug 11, 2009 4:40 pm

If underwater gravity is a negative value, the object will move up, I guess... so, when it surpass the water surface, it will be affected by normal gravity... so it would be like the real force on water, woudn't?

Re: [DECORATE] Underwater options

by Graf Zahl » Tue Aug 11, 2009 12:32 pm

Cutmanmike wrote:Actually that's a good idea, but how does gravity work underwater right now? I.e if I dropped an imp in the water he wouldn't sink to the bottom would he?

It doesn't use gravity but a different (hardcoded) value called SINK_SPEED.

Re: [DECORATE] Underwater options

by FuzzballFox » Tue Aug 11, 2009 9:02 am

Cutmanmike wrote:Actually that's a good idea, but how does gravity work underwater right now? I.e if I dropped an imp in the water he wouldn't sink to the bottom would he?
Could be used for different viscosities in liquids..."Blood is thicker than water" as the saying goes...;D

Re: [DECORATE] Underwater options

by Cutmanmike » Tue Aug 11, 2009 6:20 am

Actually that's a good idea, but how does gravity work underwater right now? I.e if I dropped an imp in the water he wouldn't sink to the bottom would he?

Re: [DECORATE] Underwater options

by Graf Zahl » Tue Aug 11, 2009 5:56 am

The only thing here that might have a chance is the gravity. The rest is 'no'd.

[DECORATE] Underwater options

by Daniel » Tue Aug 11, 2009 5:23 am

Hello,

I've tried to make some objects which change behaviour on undewater using A_JumpIf, but I miss some global variables that should help the editing. With the actual code, we must make objects that call A_JumpIf always. So, the idea is creating some Underwater options, maybe to put into the MAPINFO lump (or DECORATE, if you do prefer, then we could do different configs to varius objects). Here they are:

UnderwaterEffect = [x]
can be 0, 1, 2, 3 according to how much the object is submerge (just like in A_JumpIf)
UnderwaterFlags = [flags]
we could add some flags, such as FLOATBOB or LOWGRAVITY, to make some desired effects.
UnderwaterGravity = [factor]
the multiplied gravity factor for underwater effect (0.5 for example)

With this, we could make monsters that float only underwater (for example: a fish)

Hope this should help!

EDIT: or the addition of the following flags should also help:
+UNDERWATER.FLOATBOB
+UNDERWATER.LOWGRAVITY
etc.
So, the only variable to be added should be UnderwaterEffect [x]

Top