Graphics

 View Only
  • 1.  Same code, not same action !

    Posted 01-24-2012 07:47
    With this code, I compare value of my text object... After I look what is the page to hide, and do what I need... From "Somme" to "Quest" no matter (without the waitfor pb, see my other post), but returning to "Somme" don't do "Anim_Somme.PlayRange(10,20,true)" :(

    Please note that my 2 animControllers are in my scene (second one after the first) with keyframe, on different track...

    Dim Anim_Quest, Anim_Somme as xpAnimController

    Scene.GetAnimControllerByName("Anim_Quest", Anim_Quest)

    Scene.GetAnimControllerByName("Anim_Somme", Anim_Somme)

    Dim PageToHide as xpTextObject

    Scene.GetObjectByName("Jeu_PageToHide", PageToHide)

    Select Case Text

    Case "Quest"

    If PageToHide.Text = "Somme" Then

    Anim_Somme.PlayRange(10,20,true)

    End If

    Anim_Quest.PlayRange(1,10)

    PageToHide.Text = "Quest"

    Case "Somme"

    If PageToHide.Text = "Quest" Then

    Anim_Quest.PlayRange(10,20,true)

    End If

    Anim_Somme.PlayRange(1,10)

    PageToHide.Text = "Somme"

    End Select


    Thank you !


  • 2.  RE: Same code, not same action !

    Posted 01-24-2012 09:04
    Hi Vincent, do you use this through scripting or through the API? I'm trying to work out where the "Text" in "Select Case Text" comes from since there is no reference to an object.

    #XPression


  • 3.  RE: Same code, not same action !

    Posted 01-24-2012 10:37
    Script...
    ..........
    #XPression


  • 4.  RE: Same code, not same action !

    Posted 01-24-2012 19:16
    Sorry Vincent, I can't help you with the scripting; I use the API and some things are a slightly different.

    Possibly one of the Ross-guys can help you.

    #XPression


  • 5.  RE: Same code, not same action !

    Posted 01-27-2012 13:15
    @Vincent:

    which event did you bind your script to? Is this event fired?

    You could find out if your your script is running by popping-up a messagebox.

    Put a messagebox at several lines of your code to see if the script is interrupted or running through.

    i.e.

    msgBox("Hello i reached my script")

    #XPression