Are you sure you want to report the post shown below? This will send an email to the ATVO administrators.
Please include a short reason for reporting.
Users reporting for no reason may be locked out.
Post
Posted by Nick Thissen
on
The script will return a string (text) depending on several conditions. If the driver did not start it will say "DNS", if he disconnected it will say "DNF" and if he's in the pits it will say "PIT". Can you verify that this step at least works? To make this work you need to put a Label with a binding to "entitysessionresult_object" and this script selected as the converter script. If all is well the Label should show the correct text. If that is working you can remove this again, as you don't want to show the text.
The next step is showing an image based on the text. To do that you can use the Background of a Label (or SubWidget) and make it a Dynamic Image. Dynamic images take text as input and convert it to a filepath (relative to your theme folder) of an image. If you make images named "PIT.png", "DNF.png" etc, then you can refer to the images like this. In the Dynamic Image properties you need to add a binding to "entitysessionresult_object" just like in the text before, and select the script as the converter script. This time you need one more step which is the translation between this text ("PIT") and the image path (for example: "Images/status/PIT.png". You do this with the Path property, which takes a "template" path where the macro "{0}" will be replaced with your script output.
If your images are stored in a folder called "status" you can use this Path: "Images/status/{0}.png". The {0} is the macro and will be replaced with PIT,DNF,DNS, etc.