Report post

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 Alexander K
on
Hi,

I modified my Overlay with a script like this one, but now i have the problem with the format of my output (livegap) and
i have no idea to change this format with the script. I hope anyone can help me.



using System; 
using ATVO.ThemesSDK;
using ATVO.ThemesSDK.Data.Results;
using ATVO.ThemeEditor.ThemeModels;

namespace Scripts
{
public class Script
{

public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
IEntitySessionResult result = (IEntitySessionResult) value;

if (result.DidNotStart == true)
return "OUT";

if (result.Out == true)
return "OUT";

if (result.Entity.Car.Movement.IsInPits == true)
return "IN PIT";

if (result.Finished == true)
return "FINISH";

if (result.Position == 1)
return "LAP " + result.CurrentLap.Number;

else
    return "+" + result.LiveGap;
   
}
}
}



BR Alex