Attributes > Functions


Tween a Number Attribute

change dropdown to number over number sec using dropdown

Applies a tween to the given number attribute.

var attributeTween = attributeTweens.get("[ATTRIBUTE]");
if(attributeTween == null) {
  attributeTween = new TweenFloat();
  attributeTween.doOnUpdate(function() {[ATTRIBUTE] = attributeTween.value;});
  attributeTweens.set("[ATTRIBUTE]", attributeTween);
attributeTween.tween([ATTRIBUTE], [NUMBER], [EASING],[NUMBER]*1000));

//Or in one line (slower, uses dynamic typing)
tweenNumber([TEXT], [NUMBER], [NUMBER], [EASING]) //internal name, value, duration (seconds), easing

Cancel Tween

stop changing dropdown

Stops an ongoing number tween.


Has Value?

attribute has value

Returns true if the given attribute has a value (is not "null").


Clear Value of Attributes

clear value of attribute

Disassociates the given attribute from any value. (Sets its value to "null", does not have any effect on primitive types like numbers/booleans)

[ATTRIBUTE] = getDefaultValue([ATTRIBUTE]);