Difference between revisions of "MoveObj (CMS)"
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 |- | moveObj("obj", x, y, delay, ...") |
(No difference)
|
Revision as of 16:20, 15 August 2014
Name | Type | By |
---|---|---|
moveObj("obj", x, y, delay, easing) | Definition | AFRLme |
This small function allows you to move an object from one position to another over x amount of time with specified easing.
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...
moveObj("object_name", 300, 450, 5000, easeQuintOut) -- move object_name to 350x450 over 5000 milliseconds with easeQuintOut
Main Script
function moveObj(obj, x, y, delay, easing)
obj = getObject("Game.GameCurrentScene.SceneObjects[" .. obj .. "]")
startObjectTween(obj, VObjectOffset, obj:getPoint(VObjectOffset), {x = x, y = y}, delay, easing)
end
Syntax Breakdown
Name | Type | Description |
---|---|---|
c | "string" | This should be a "string" value containing the name of the character you want to affect; if string is empty it will default to current character. |
t | "string" | This should be a "string" value containing the name of the object you want to align to. |