Zum Inhalt springen
AppgineeringAppgineering
Shop
Schreibgeschützt3 Beiträge · 2,453 Aufrufe · Erstellt 23 Mar 2020, 17:12

Proper Way to do RPM Display with Dynamic Images?

Archiviert: Diskussion auf Discord verlagertDiscord
Kyle H.Ursprünglicher Verfasser
#1

Hi folks, I remember a while back there were people who had discovered how to do RPM displays with dynamic images. Could someone give me a rundown on how this is done? Thank you!

Kyle

#2

use

using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Entity;

namespace Scripts
{
public class REVCOUNTER : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
value = ((IDriver)value).Car.Movement.Rpm;
value = (int)value / 400 * 400;
return value.ToString();
}
}
}

as script and bind your image to /rpm{0000}.png images should look like rpm5000.png rpm5400.png and so on

#3

Sören K. wrote:
use

using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Entity;

namespace Scripts
{
public class REVCOUNTER : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
value = ((IDriver)value).Car.Movement.Rpm;
value = (int)value / 400 * 400;
return value.ToString();
}
}
}

as script and bind your image to /rpm{0000}.png images should look like rpm5000.png rpm5400.png and so on

Thank you very much!

Dieser Thread ist archiviert.

Neue Antworten finden auf Discord statt.

Auf Discord weiterlesen