PlayObjectAnimation

Famille: 3D · Une forme

Ce que fait la commande

PlayObjectAnimation déclenche quelque chose sur-le-champ : il joue. Il prend objectID (un entier), animationName (une chaîne), startTime (un flottant), endTime (un flottant), loop (un entier) et tweenTime (un flottant), et ne rend rien. objectID est l'identifiant d'un objet 3D, celui que LoadObject a rendu : c'est ainsi que l'appel sait sur quoi agir.

Syntaxe

PlayObjectAnimation(objectID integer, animationName string, startTime float, endTime float, loop integer, tweenTime float)

Paramètres

NomType
objectIDinteger
animationNamestring
startTimefloat
endTimefloat
loopinteger
tweenTimefloat

Chaque forme rend

rien

Exemple · engendré

object = LoadObject("assets/media.obj")PlayObjectAnimation(object, "player", 1.0, 1.0, 1, 1.0)DO  Sync()LOOP

LoadObject est là pour donner à l'appel quelque chose sur quoi agir : PlayObjectAnimation est la ligne qui compte. La boucle DO … LOOP n'est pas décorative : un programme BASIC classique s'arrête dès qu'il n'a plus de lignes, et c'est Sync() qui dessine l'image.

286 commandes dans 3D