AutoType

From Unify Community Wiki
Revision as of 23:32, 2 June 2007 by NCarter (Talk | contribs)

Jump to: navigation, search

Author: Daniel

Description

Automatically types a string of text typewriter style.

Usage

Place this script onto a GUIText.

Javascript - AutoType.js

<javascript>var word = "Hello World"; var letterPause = 0.2; var sound : AudioClip;

function Start () { guiText.text = ""; TypeText (); }

function TypeText () { for (var i = 0; i < word.Length; i++) { guiText.text += word[i]; if (sound) audio.PlayOneShot (sound); yield WaitForSeconds (letterPause); } }</javascript>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox