Author Topic: Size Issue [Solved]  (Read 2152 times)


Script code:

scale = "1 1 1";
change to
scale = "0.5 0.5 0.5";
Why the shape model does not change to smaller size. I am doing work on the Key Magic Orbs.
« Last Edit: September 25, 2013, 08:00:37 AM by Furling² »

As far as I know, it is not possible to adjust the scale of the model with script. You'll have to adjust it in your modeling software.

EDIT: To clarify, if you're trying to adjust to scale of the model that is held in the players hand. You can't unfortunately. You'll have to adjust the scale in your modeling software. If you just want to scale the spawned item, MARBLE MAN's suggestion should work just fine.
« Last Edit: September 24, 2013, 06:43:06 PM by Zelothix »

Parent ::OnAdd and then set scale

First I thought the title was a not-so-sublte joke, then I realized it was furling.

First I thought the title was a not-so-sublte joke, then I realized it was furling.
lol

Parent ::OnAdd and then set scale
Can you give me an example?
« Last Edit: September 25, 2013, 03:10:04 AM by Furling² »

First I thought the title was a not-so-sublte joke, then I realized it was furling.
You were definitely not the only one, lol.



Item spawm on the brick- Thumb up!
Code: [Select]
function redKeyMagicItem::onAdd(%this,%obj)
{
Parent::onAdd(%this,%obj);
%obj.setscale("0.3 0.3 0.3");
}

Item in the player's hand- Not work :(
Code: [Select]
function redKeyMagicImage::onAdd(%this,%trigger)
{
Parent::onAdd(%this,%trigger);
%trigger.setscale("0.3 0.3 0.3");
}

Item in the player's hand- Not work :(
Code: [Select]
function redKeyMagicImage::onAdd(%this,%trigger)
{
Parent::onAdd(%this,%trigger);
%trigger.setscale("0.3 0.3 0.3");
}

redKeyMagicImage::onAdd(%this) would refer to when a datablock named that is created (if that even works). You're looking for redKeyMagicImage::onMount(%this, %obj, %slot) - however, images mounted to players are not separate objects. %obj would refer to the player object. There is no way to "individually scale images".

redKeyMagicImage::onAdd(%this) would refer to when a datablock named that is created (if that even works). You're looking for redKeyMagicImage::onMount(%this, %obj, %slot) - however, images mounted to players are not separate objects. %obj would refer to the player object. There is no way to "individually scale images".
Okay I'll try it.

Edit:
Code: [Select]
function redKeyMagicImage::onMount(%this,%obj,%slot,%item)
{
Parent::onMount(%this,%obj,%slot,%item);
%obj.setscale("0.3 0.3 0.3");
}
This obj make player small. I want the item small, not player.
« Last Edit: September 25, 2013, 06:37:34 AM by Furling² »



Item spawm on the brick- Thumb up!
Code: [Select]
function redKeyMagicItem::onAdd(%this,%obj)
{
Parent::onAdd(%this,%obj);
%obj.setscale("0.3 0.3 0.3");
}

Item in the player's hand- Not work :(
Code: [Select]
function redKeyMagicImage::onAdd(%this,%trigger)
{
Parent::onAdd(%this,%trigger);
%trigger.setscale("0.3 0.3 0.3");
}
To clarify, if you're trying to adjust to scale of the model that is held in the players hand. You can't unfortunately. You'll have to adjust the scale in your modeling software. If you just want to scale the spawned item, MARBLE MAN's suggestion should work just fine.


redKeyMagicImage::onAdd(%this) would refer to when a datablock named that is created (if that even works). You're looking for redKeyMagicImage::onMount(%this, %obj, %slot) - however, images mounted to players are not separate objects. %obj would refer to the player object. There is no way to "individually scale images".
Okay I'll try it.

Great logic.


Mind posting what you did to fix it?