Difference between revisions of "ShaderFollowCharacter (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "<div class="toccolours mw-collapsible mw-collapsed tbl-ds"> <span class="bold">Function History</span> <div class="mw-collapsible-content"> <div class="alt-bg">Available since...")
 
Line 4: Line 4:
 
<div class="alt-bg">Available since v4.0</div>
 
<div class="alt-bg">Available since v4.0</div>
 
</div></div>
 
</div></div>
 +
  
 
Smoothly follow a specific camera around the screen. ''The [[Shader_(CMS)|shader toolkit]] is needed for this function to work''.
 
Smoothly follow a specific camera around the screen. ''The [[Shader_(CMS)|shader toolkit]] is needed for this function to work''.

Revision as of 18:47, 16 August 2014

Function History

Available since v4.0


Smoothly follow a specific camera around the screen. The shader toolkit is needed for this function to work.


Syntax:

shaderFollowCharacter(character, zoom, delay)


Example 1: follow current character around the screen

shaderFollowCharacter("", 1.2, 3000) -- follow current character at 1.2x zoom over 3s per movement.

Example 2: follow a specific character around the screen

shaderFollowCharacter("character_name", 1.2, 3000) -- follow character_name at 1.2x zoom over 3s per movement.

Example 3: stop following camera & restore screen viewport back to default value

shaderStopFollow(easeQuintOut) -- stop following camera & ease back to viewport default with QuintOut


Arguments

character: "string"
This should be the name of the character you want to follow; if string is empty then it will automatically follow the current character.

zoom: float (number)
This should contain the zoom amount. (1 = default)

delay: integer (number)
The amount of time (milliseconds) needed to scroll &/or zoom the camera to the current characters location.


Flags

none


Return

none


Relevant Pages: to add...