Author Topic: Player_AquaTrooper  (Read 606 times)

It came to my attention that there wasn't any player that went at a reasonable speed underwater. I tried to make a quick little playertype, with the following script.

datablock PlayerData(PlayerAquaTrooperArmor : PlayerStandardArmor)
{

   maxUnderwaterBackwardSpeed = 10;
   maxUnderwaterForwardSpeed = 10;
   
   canJet = 0;

   uiName = "Aqua Trooper Player";
   showEnergyBar = false;
};


Well, when I tried this, it didn't work. I believe that the reason for this is that the player has to crouch underwater, and the crouch speed would have to be increased. Unfortunately, it would also work on land, so I need to try a new tack.

The new playertype would use the trigger onEnterLiquid to change the datablock of the player to one with jets. Then, with onLeaveLiquid, it would change the datablock back again. This would make it so that the player could go faster underwater if they wanted.
The only problem is that I have no idea how to do this.
I think it would need to use onEnterLiquid and onLeaveLiquid and use their parent function stuff, but add a little more as well. I don't know where to get the parent stuff, and so I can't continue.

The underwater forward speed of the default player is 8.4. Just increase the variable more (you might want to mess with maxUnderwaterSideSpeed too).

The underwater forward speed of the default player is 8.4. Just increase the variable more (you might want to mess with maxUnderwaterSideSpeed too).
Sorry, but that's what I did, as I said in the topic. I put the script in a different color, too.

Sorry, but that's what I did, as I said in the topic. I put the script in a different color, too.
Increase it more. You didn't increase it by all that much.

Increase it more. You didn't increase it by all that much.
I'll try it, but I am skeptical.
I'll post when I have done so.

Set the values to 200 and it made no difference.
Any suggestions would be gladly acted upon.
« Last Edit: August 09, 2011, 12:02:04 PM by Katadeus »

I need a leetle help here.
Only a leetle.