A template for Assetto Corsa python app

Apps A template for Assetto Corsa python app 1.00001

Login or Register an account to download this content
hello Hunter ,
thank you for sharing.

I have an issue. I want to collect fuel data from the AC. I inserted a label to show the fuel value, but when I do this, the app is no longer displayed on the AC.
If I remove "ac.setPosition(rowLogged, 10, 50)" line from the app, it runs perfectly.

Could you help me?
-=-=-=-=-=-
def acMain(ac_version):
global appWindow, rowLogged

appWindow = ac.newApp(appName)
ac.setTitle(appWindow, appName)
ac.setSize(appWindow, 150, 80)

rowLogged = ac.addLabel(appWindow, "001")
ac.setPosition(rowLogged, 10, 50)

ac.addRenderCallback(appWindow, appGL)

return appName

def appGL(deltaT):
global rowLogged

fuel = simInfo.physics.fuel
ac.setText(rowLogged, str(fuel) + " liters")
 
hello Hunter ,
thank you for sharing.

I have an issue. I want to collect fuel data from the AC. I inserted a label to show the fuel value, but when I do this, the app is no longer displayed on the AC.
If I remove "ac.setPosition(rowLogged, 10, 50)" line from the app, it runs perfectly.

Could you help me?
-=-=-=-=-=-
def acMain(ac_version):
global appWindow, rowLogged

appWindow = ac.newApp(appName)
ac.setTitle(appWindow, appName)
ac.setSize(appWindow, 150, 80)

rowLogged = ac.addLabel(appWindow, "001")
ac.setPosition(rowLogged, 10, 50)

ac.addRenderCallback(appWindow, appGL)

return appName

def appGL(deltaT):
global rowLogged

fuel = simInfo.physics.fuel
ac.setText(rowLogged, str(fuel) + " liters")


Hi Mombuca22

So i tried out the bit of code you've shared , and the app was finefor me :
1592340693768.png


I attached the code to my post if you want to check it out . (code.txt)

I don't know where the error could be. What does the logs says when your app was not showing ?
( you can find them here : C:\Users\YOUR_USERNAME\Documents\Assetto Corsa\logs\ py_log.txt )
 

Attachments

  • code.txt
    1.3 KB · Views: 160

Latest News

To join the OverTake Racing Club races I want them to be: (multiple choice)

  • Free to access

    Votes: 191 88.0%
  • Better structured events

    Votes: 36 16.6%
  • Better structured racing club forum

    Votes: 29 13.4%
  • More use of default game content

    Votes: 30 13.8%
  • More use of fixed setups

    Votes: 60 27.6%
  • No 3rd party registration pages

    Votes: 73 33.6%
  • Less casual events

    Votes: 18 8.3%
  • More casual events

    Votes: 73 33.6%
  • Other, specify in thread

    Votes: 12 5.5%
Back
Top