Author Topic: .cs file help i will give credit if u can help me  (Read 965 times)

ok i am wondering if i can change player size in a .cs file or at all woth a weapon if you help me i will give you credit thank you

Use a package on the relevant weapon function or player spawn functions to set their scale with Player::setScale(3-Vector).

Example for player datablock:
Quote
package ScaledPlayer
{
 function ScaledPlayerArmor::onAdd(%this,%obj)
 {
  Parent::onAdd(%this,%obj);
  %obj.setScale("2 2 2");
 }
};activatePackage(ScaledPlayer);
Untested, but it should work, assuming I have the variables right.

For weapons, you'll need to do something similar to the WeaponImage::onFire(%this,%obj,%slot), WeaponImage::onMount(%this,%obj,%slot) and/or WeaponImage::onUnMount(%this,%obj,%slot). If using a customised weapon state system with stateScript parts, put the code in the relevant functions as well as onUnMount to ensure people don't hack it by scaling up and putting the 'weapon' away.

Use a package on the relevant weapon function or player spawn functions to set their scale with Player::setScale(3-Vector).

Example for player datablock:Untested, but it should work, assuming I have the variables right.

For weapons, you'll need to do something similar to the WeaponImage::onFire(%this,%obj,%slot), WeaponImage::onMount(%this,%obj,%slot) and/or WeaponImage::onUnMount(%this,%obj,%slot). If using a customised weapon state system with stateScript parts, put the code in the relevant functions as well as onUnMount to ensure people don't hack it by scaling up and putting the 'weapon' away.

so will i have to do thelpayer data block for it to work for a weapon?