SetAnimSize (CMS): Difference between revisions

From The Official Visionaire Studio: Adventure Game Engine Wiki
Created page with "{| class="wikitable" style="width:100%" |- ! style="text-align:left" | Name !! style="text-align:left" | Type !! style="text-align:left" | By |- | setAnimSize("ani", n) || Def..."
 
No edit summary
Line 21: Line 21:
end
end
</syntaxhighlight>
</syntaxhighlight>


== Syntax Breakdown ==
== Syntax Breakdown ==
{| class="wikitable" style="width:100%"
{| class="wikitable" style="width:100%"
|-
|-
! style="text-align:left" | Name !! style="text-align:left" | Type !! style="text-align:left;width:70%" | Description
! style="text-align:left" | Name !! style="text-align:left" | Type !! style="text-align:left;width:80%" | Description
|-
|-
| ani || "string" || This should be a "string" value containing the name of the animation you want to affect.
| ani || "string" || This should be a "string" value containing the name of the animation you want to affect.

Revision as of 20:01, 14 August 2014

Name Type By
setAnimSize("ani", n) Definition AFRLme

This small function allows you to quickly set the size(%) of an active animation.

Instructions

1. Add the main script to the Visionaire Studio Script Editor & set the script as a definition script.
2. To use this function you should create an execute a script action containing...

setAnimSize("animation_name", 200) -- set active animation animation_name's size to 200%

Main Script

function setAnimSize(ani, n)
 getObject("ActiveAnimations[" .. ani .. "]"):setValue(VAnimationSize, n)
end

Syntax Breakdown

Name Type Description
ani "string" This should be a "string" value containing the name of the animation you want to affect.
n integer This should be an integer (number) value which will determine size(%) of the linked animation (ani).