Help programming da...
 
Notifications
Clear all

Help programming dash

3 Posts
3 Users
0 Reactions
1,635 Views
(@michilillo)
New Member
Joined: 1 year ago
Posts: 1
Topic starter  

I'm trying to show for Assetto Corsa Competizione the value [GameRawData.Graphics.missingMandatoryPits] only when in race, and to show '-' when in practice and qualifying.

I really can't find a way to do it. I'm sure it is a very easy task for most of you, but I'm a beginner with coding, and I can't find a way.


   
Quote
Topic Tags
(@stevenbarnette)
New Member
Joined: 1 year ago
Posts: 1
 

Posted by: @michilillo

I'm trying to show for Assetto Corsa Competizione the value [GameRawData.Graphics.missingMandatoryPits] only when in race, and to show '-' when in practice and qualifying. geometry dash subzero

I really can't find a way to do it. I'm sure it is a very easy task for most of you, but I'm a beginner with coding, and I can't find a way.

Hello, I think you should se conditional statements in your code. Here's an example using Python:

python
import ac

def acMain(ac_version):
app_window = ac.newApp("Pit Status")
ac.setSize(app_window, 200, 50)

# Check game mode
is_race = ac.getGameMode() == acsys.GameMode.Race

# Create label
label = ac.addLabel(app_window, "")

# Update label based on game mode
def update_label(delta_t):
if is_race:
# Get the value [GameRawData.Graphics.missingMandatoryPits]
value = ac.getCarState(0, acsys.CS.MissingMandatoryPits)
ac.setText(label, str(value))
else:
ac.setText(label, "-")

# Register update_label function to run every frame
ac.addRenderCallback(app_window, update_label)

return "Pit Status"

This script creates a simple app window in Assetto Corsa Competizione and displays the value of [GameRawData.Graphics.missingMandatoryPits] when in race mode. In practice and qualifying modes, it displays a dash '-'. The update_label function is called every frame to update the label text based on the game mode.

 

This post was modified 1 year ago by stevenbarnette

   
ReplyQuote
(@beto_225)
New Member
Joined: 8 months ago
Posts: 2
 

Try this:

if([SessionTypeName] == 'RACE', [GameRawData.Graphics.missingMandatoryPits], '-')

   
ReplyQuote
Share: