Graphics

 View Only
  • 1.  Script not working on different computers

    Posted 11-30-2020 19:18

    Hi!

     

    I'm having a problem where my script which is on event in a scene director is not working when importing the project to other computers. I'm using Xpression SCE 6.5 3700 on all machines but it's working on 3/5 machines I've tested. They all run Windows 10 and are up to date as of now. There are and have been other version of xpression installed on the machines so that might have something to do with the problem, but I cant resolve the problem on the other machines. When trying the scene on another machine, all I'm doing is copying over the entire folder and running the scene. Tried reinstalling xpression on the computers that the script won't work on with no luck. There are other scripts in the scene that is working perfectly fine, only this one is not working. This is the script I'm having trouble with on certain machines:

     

    dim arrow as xpBaseObject
    dim ValueOld as xpTextObject
    dim ValueNew as xpTextObject
    dim MoveArrow as xpAnimController




    Scene.GetObjectByName("arrow", arrow)

    Scene.GetObjectByName("ValueOld", ValueOld)
    Scene.GetObjectByName("ValueNew", ValueNew)

    Scene.GetAnimControllerByName("MoveArrow", MoveArrow)

    MoveArrow.SetKeyFrameValueTCB(arrow, 0,"Position.X",(ValueOld.text),0.5,1.0,0.0)
    MoveArrow.SetKeyFrameValueTCB(arrow, 24,"Position.X",(ValueNew.text),0.5,1.0,0.0)


  • 2.  RE: Script not working on different computers

    Posted 11-30-2020 19:28

    Hi Herman
    Is the script getting called at all? Try putting engine..debugmessages in your script to see where it is not reaching. Also, is your script at frame zero of the scene director, if so move it in a couple of frames. I’ve had scripts not being called at all if at the very start of. a scene director.
    Simon


    #XPression


  • 3.  RE: Script not working on different computers

    Posted 11-30-2020 20:07

    Thank you for the answer!

     

    I've tried moving the script in the scene director but that doesn't help. Inserting a debug message before the MoveArrow line does respond but debug message doesn't show after:

    MoveArrow.SetKeyFrameValueTCB(arrow, 0,"Position.X",(ValueOld.text),0.5,1.0,0.0)
    MoveArrow.SetKeyFrameValueTCB(arrow, 24,"Position.X",(ValueNew.text),0.5,1.0,0.0)

    Interestingly moving the ValueOld and ValueNew text objects and the quad named arrow to a different place in the object manager seems to do the trick. Does not explain why the scripts is working on some computers and not on others and I don't want to rearrange all the objects every time I have to export and import the scene to my clients computer.


    #XPression


  • 4.  RE: Script not working on different computers

    Posted 11-30-2020 20:20

    Found it!

    So the value that was pushed into the keyframes used "." instead of ",". So using replace in VL to convert "100.550" to "100,550" did the trick. Does still not explain why I could use values with "." instead of "," on the other Xpression machines as keyframe values....


    #XPression


  • 5.  RE: Script not working on different computers

    Posted 11-30-2020 20:22

    Are all your machines set to the same locale? Might be an internationalisation thing. Glad it’s working though!


    #XPression


  • 6.  RE: Script not working on different computers

    Posted 11-30-2020 20:41

    No they where not and changing window's system language from Norwegian to English (United States) made it possible to use "." as decimal point. Thank you for pointing that out! That explains why some machines worked and some did not :D


    #XPression