Hi,
I made a little one-minute film on the disassembly of a PC: VUEDEHAUT - L'univers Prise De Vue Aerienne..
This “film” contains 12 animations (. anim) for parts of the PC + 1 for the main camera, not using SRIPT, but using only the curves of the windows animation files (. anim ).
I should have thought before, but now I want to start all with a button.
My question is: Is it possible to order by Script (js) all my animations?
Philippe
current script only works for the animation of the camera?
var beep : AudioClip;
animation.Stop();
function OnGUI () {
var ScreenX=Screen.width-90;
var ScreenY=Screen.height-135;
GUILayout.BeginArea (Rect(ScreenX,ScreenY,70,125));
if (GUILayout.Button("Auto")){
audio.PlayOneShot(beep);
animation.Play("0 Animation Camera1");
animation.Play("1 Animation Capot");
animation.Play("2 Animation Alim");
animation.Play("3 Animation driveHDD");
animation.Play("4 Animation driveSSD");
animation.Play("5 Animation DVD");
animation.Play("6 Animation CG");
animation.Play("7 Animation Coeur");
animation.Play("8 Animation ventirad");
animation.Play("9 Animation RAM1");
animation.Play("10 Animation RAM2");
animation.Play("11 Animation RAM3");
animation.Play("12 Animation i920");
}
if (GUILayout.Button("Manuel")){
print ("Bouton Manuel");
audio.PlayOneShot(beep);
}
if (GUILayout.Button("RAZ")){
audio.PlayOneShot(beep);
animation.Stop("0 Animation Camera1");
animation.Stop("1 Animation Capot");
animation.Stop("2 Animation Alim");
animation.Stop("3 Animation driveHDD");
animation.Stop("4 Animation driveSSD");
animation.Stop("5 Animation DVD");
animation.Stop("6 Animation CG");
animation.Stop("7 Animation Coeur");
animation.Stop("8 Animation ventirad");
animation.Stop("9 Animation RAM1");
animation.Stop("10 Animation RAM2");
animation.Stop("11 Animation RAM3");
animation.Stop("12 Animation i920");
}
if (GUILayout.Button("Com'3D")){
print ("Bouton Web");
audio.PlayOneShot(beep);
Application.OpenURL ("http://www.com3d.fr/");
}
if (GUILayout.Button("Quitter")){
audio.PlayOneShot(beep);
Application.Quit();
}
GUILayout.EndArea();
}
@script RequireComponent (AudioSource)