Graphics

 View Only
  • 1.  Script consistancy issues

    Posted 11-11-2015 22:01
    I've got a script that runs differently ever time I play the scene. I can run it over and over again with the same data being inputted into it but it comes out differently every time. I think it has to do with the DatalinqKey scripting that I'm using, but I'm not sure. Anybody else come across a similar issue?


  • 2.  RE: Script consistancy issues

    Posted 11-12-2015 14:00
    Things like this can happen when you put scripts in OnSetText that try to access data in other text fields that are also being updated via datalinq. Since you can't guarantee in which order the text objects will get updated you can end up with unpredictable results. Often this requires very careful planning of the OnSetText scripts to ensure they will be correct regardless of which one runs first, or moving things to OnOnline or visual logic.

    #XPression


  • 3.  RE: Script consistancy issues

    Posted 11-12-2015 19:11
    I was trying this in the OnOnline and OnRender sections (not at the same time just one and then the other to see if my result changed). At this point the data is not being updated or changed except for the DatalinqKey, but this change is scripted and should change the same every time. What I have set up is one text field attached to the DatalinqKey that searches through lines of text in a text document. It uses strings to search these lines for certain information. If the line contains that information it is suppose to save this text to a static text field. The code then moves the DatalinqKey to the next line and repeats saving further information to the next static text field. It repeats until the code gets to a certain line in the text document. Sometimes it works. Sometimes it doesn't though.

    #XPression