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: 186

Latest News

Do you prefer licensed hardware?

  • Yes for me it is vital

  • Yes, but only if it's a manufacturer I like

  • Yes, but only if the price is right

  • No, a generic wheel is fine

  • No, I would be ok with a replica


Results are only viewable after voting.
Back
Top