Author Topic: Possible to set player scale in a player datablock?  (Read 1170 times)

Is it possible to set a player scale in a player datablock like this?
datablock PlayerDate(PlayerTye : PlayerStandardArmor)
{
 Scale = "Scale";
};
?
EDIT: and edit the persons apperance?
« Last Edit: December 16, 2009, 04:53:23 PM by Pah1023 »

You would have to modify the function that is called when the player is created/changed.

can you tell me that function?

Armor::OnAdd?
Armor::OnCreate
idk

function YourDatablock::onNewDatablock(%this, %obj)
{
   parent::onNewDatablock(%this, %obj);
   %obj.setscale("scale");
}

Thanks, i will try that.

function YourDatablock::onNewDatablock(%this, %obj)
{
   parent::onNewDatablock(%this, %obj);
   %obj.setscale("scale");
}

And sorry for double post :c
I believe that would work but..
i did Trace();
and came up with this so i could include Multiple datablocks in it and parented it
Code: (The function) [Select]
function Player::ChangeDataBlock(%player, %Armor, %cl)

A: ChangeDatablock just calls setDatablock and most scripts usually use setDatablock.
B: ChangeDatablock is not called if a new object with the datablock is created.

If you wanted to do this with multiple datablocks you'd do change the code I originally posted to say "armor" instead of YourDatablock and package it.