Difference between revisions of "SetScale"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Speedo
(Please include variable types when giving syntax; removed byline)
imported>Thepal
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
=SetScale (function/command)=
'''Syntax:'''
(none) reference.SetScale nuScale:float


This [[Console command|command]] sets the scale (relative size) of the referenced object to the specified value.
Sets the scale of the calling object to the specified amount: 1.0 being "normal size", 2.0 being twice normal size, etc.  


==Syntax==
'''Example:'''
SetScale ''Percent:float''
UmbraRef.SetScale 1.5


==Syntax Description==
Increases Umbra's size by 150%.
<table border="1" style="border:1px solid">
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Optional or Required</th>
<th>Details</th>
</tr>
<tr>
<td> ''percent'' </td>
<td> [[Float]] </td>
<td> Required </td>
<td> The scale, expressed as a decimal percentage; <tt>1.00</tt> = 100% (normal size), <tt>0.90</tt> =  90% of normal size, and so on.<br>
Valid values are from <tt>0.50</tt> (50%) to <tt>2.00</tt> (200%).<br>
A value of <tt>1.00</tt> returns the item to its default size.<br>
Leading or trailing zeros are recommended, but not required (i.e. <tt>1.5</tt> = <tt>1.50</tt>).
</td>
</tr>
</table>


==Example==
==Notes==
The following example sets the scale of the selected object to 150%:
SetScale 1.50


==Additional Details (Notes)==
* The scale is limited in the range of 0.5 - 2.0. Higher or lower values are accepted, but have no effect beyond that range.
* The Reference ([[RefID|referenceID]]/called object) can be specified in Console Mode by pre-selecting the object.
* The scale is limited in the range of 0.5 - 2.0. Higher or lower values do not generate errors, but have no effect beyond that range.
** Use OBSE's [[SetScaleEX]] for sizes outside of that range.
** Use OBSE's [[SetScaleEX]] for sizes outside of that range.


Line 40: Line 19:


*To update the collision info, you'll need to [[Disable]] and re-[[Enable]] the referenced object.
*To update the collision info, you'll need to [[Disable]] and re-[[Enable]] the referenced object.
*For creatures and NPCs you may notice that they are warped upon death after scaling them (their body parts are stretched and contorted). This can also be fixed by using [[Disable]] and re-[[Enable]] on the referenced creature/NPC.


==See Also==
==See Also==
Line 45: Line 26:
*[[ModScale]]
*[[ModScale]]
*[[SetScaleEX]]
*[[SetScaleEX]]
*[[SetSize]]


[[Category: Functions]]
[[Category: Functions]]
Line 51: Line 33:
[[Category: Statistics Functions]]
[[Category: Statistics Functions]]
[[Category: Statistics Functions (CS 1.0)]]
[[Category: Statistics Functions (CS 1.0)]]
<!-- Begin Search Terms
Set
Scale
End Search Terms -->

Latest revision as of 03:08, 9 May 2010

Syntax:

(none) reference.SetScale nuScale:float

Sets the scale of the calling object to the specified amount: 1.0 being "normal size", 2.0 being twice normal size, etc.

Example:

UmbraRef.SetScale 1.5

Increases Umbra's size by 150%.

Notes[edit | edit source]

  • The scale is limited in the range of 0.5 - 2.0. Higher or lower values are accepted, but have no effect beyond that range.
    • Use OBSE's SetScaleEX for sizes outside of that range.
  • When used on a player in first person, changes do not affect the character's model when he switches to third person. Also, although this command does automatically change the point of view of the character while in first person, the camera does not move nearly as much as would be expected in most scaling operations.
  • When called on NPCs, the value supplied is treated as a multiplier to the character's base scale, which is determined by the NPC's race. So calling setScale 1.5 on a High Elf, which has a base scale of 1.1, results in a scale of 1.65, and the same value will be returned by getScale.
  • To update the collision info, you'll need to Disable and re-Enable the referenced object.
  • For creatures and NPCs you may notice that they are warped upon death after scaling them (their body parts are stretched and contorted). This can also be fixed by using Disable and re-Enable on the referenced creature/NPC.

See Also[edit | edit source]