Need Help Changing Armor DataBlock
by Hunter Luisi · in Torque Game Engine · 08/29/2001 (6:27 pm) · 3 replies
I'm trying to change the way a player moves when entering water, but when I change the armor datablock the player movement gets jerky when jetting. It looks like the jet direction is doing a 180 every 1 or 2 seconds.
Heres what I'm trying:
Heres what I'm trying:
function Armor::onEnterLiquid(%data, %obj, %coverage, %type)
{
%test = %obj.getDataBlock();
%obj.oldHRF = %test.horizResistFactor;
%test.horizResistFactor = ( 0.3 );
%obj.setDataBlock( %test ); // is this even needed???
echo ( "Test to see if changed horizResistFactor: " @ %obj.getDataBlock().horizResistFactor );
................
Torque Owner Tim Gift
The simplest way to make the player's behavior change in the water would be to extend the player's movement code to support it directly.