Game Development Community

Detecting Custom LiquidTypes

by Kent Frauendienst · in Torque Game Engine · 06/11/2009 (2:13 pm) · 1 replies

I'm trying to devise a system where a script will determine what to do to a player when it enters the specified form of liquid. Looking at the onEnterLiquid and onLeaveLiquid script callbacks, I see a %type parameter common to both of them. However, whenever I move the player into the liquid and it triggers these callbacks, the %type is always zero.

So how exactly does this work? Would it be easy to modify the callback to find out in which waterblock object the player is submerged?

#1
06/12/2009 (5:17 pm)
Have you changed the LiquidType property for your waterblock in the editor? Because setting a water block to "Lava" definitely works for me. Although a small fix is necessary if you want incremental damage instead of insta-death.

Note: and this will only work for TGE. The liquidtype functionality was broken in TGEa and in Torque 3D.