Ok, I just realized, mass DOES have an effect here. I wasn't remembering what numbers I was changing in my player datablock.
Apperantly, super-high density DOES work, I just had a high mass at the same time, which messed me up. Sinking works as well as it can nao.
Only, I have a few problems still.
1. Playing root animation underwater doesn't work. Nothing happens.
I'm using this command within a slash command:
%client.player.playthread(0,root);
2. I also don't want this player to take damage. I made sure that it just plain returns on the new player datablock's ::OnDamage function, but the player still impulses on a hit, what should I do here? I know it has something to do with ::OnCollision...?
3. I don't want the player to be able to change colors during the effect of the script. (It changes node "ALL" to a shade of gray, but if the player is painted or changes clothing under the effect, they revert to original colors.) What should I package over? More ::OnCollision stuff?
4. For some reason, when the function that reverts the player back to normal is called, it doesn't change the datablock of the player back to normal, if the player is outside of a minigame.
Not really working codez:
{code} if(getMiniGameFromObject(%obj)) {
%minigame = getMiniGameFromObject(%obj);
echo(%minigame.PlayerDataBlock);
%obj.setDataBlock(nametoID(%minigame.PlayerDataBlock));
}
else %obj.setDataBlock(nametoId("PlayerStandardArmor"));
{/code}
The part that executes within the if works fine, and the player is reverted successfully, but the else doesn't work right. It always says "Can't find datablock "-1" ". And yet, when I perform the exact same NameToID("PlayerStandardArmor"); function within the console (inside an echo), it always produces a number. And yet, if I try doing the same thing with that number, it still produces the "Can't find -1" error. It works fine changing the datablock to the "new" player datablock, but not the other way around. I have to use the mission editor to revert it... and even so it doesn't make it work right.
Help appreciated much.