| Blockland Forums > Modification Help |
| Player_AquaTrooper |
| (1/2) > >> |
| Katadeus:
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. |
| Amade:
The underwater forward speed of the default player is 8.4. Just increase the variable more (you might want to mess with maxUnderwaterSideSpeed too). |
| Katadeus:
--- Quote from: Amade on August 08, 2011, 02:57:21 PM ---The underwater forward speed of the default player is 8.4. Just increase the variable more (you might want to mess with maxUnderwaterSideSpeed too). --- End quote --- Sorry, but that's what I did, as I said in the topic. I put the script in a different color, too. |
| Amade:
--- Quote from: Katadeus on August 08, 2011, 04:14:41 PM ---Sorry, but that's what I did, as I said in the topic. I put the script in a different color, too. --- End quote --- Increase it more. You didn't increase it by all that much. |
| Katadeus:
--- Quote from: Amade on August 08, 2011, 07:16:34 PM ---Increase it more. You didn't increase it by all that much. --- End quote --- I'll try it, but I am skeptical. I'll post when I have done so. |
| Navigation |
| Message Index |
| Next page |