• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

How to recognize teleporting to pits in Python?

JBreak

New Member
I have built an app that records hotstints. You select the duration (3, 5, 10, 20 etc laps) and drive an outlap after which the app starts recording your times for the stint. Currently the stint is terminated once you enter the pitlane, and a new stint is started when you exit. It is simple and straightforward but I was thinking it would be nice to allow the driver to do pitstops in the middle of the stint. It would be interesting to try different strategies for longer stints.

But if I allow pitstops (in other words), then I should account for the player teleporting to pits in the middle of the stint (pressing esc and selecting "back to pits"). However, I could not find information anywhere on how to recognize this event in the app. I could come up with some hacks to try to guess when this happens from the sudden change of location etc. but none seem too reliable or practical.

Does anyone know on how to best recognize when the player teleports to the pits in a Python app? I feel I might be missing something obvious...
 

JBreak

New Member
Perhaps I should elaborate, I want to tell when the player teleports to the pits instead of driving there. If the player teleports, they take a shortcut which should invalidate the stint. Also I thought it would be a handy way to restart the stint intentionally if the player teleports back. I am trying to keep buttons and such to a minimum on the UI.
 

fughettaboutit

aka leBluem
Perhaps I should elaborate, I want to tell when the player teleports to the pits instead of driving there. If the player teleports, they take a shortcut which should invalidate the stint. Also I thought it would be a handy way to restart the stint intentionally if the player teleports back. I am trying to keep buttons and such to a minimum on the UI.
That should happen just like that, you dont get lap invalid when you click back to pits? Then maybe something is setup wrong on this track or it doesnt work in practice ... .

Unfortunately there is no such property as "playerTeleported"
 

fughettaboutit

aka leBluem
maybe you can check for those:

Code:
pitlimiter = False

def acUpdate(...):
  # maybe do this in timed intervalls
  if info.physics.pitLimiterOn:
    pitlimiter = True
  else:
    pitlimiter = False

  if info.praphics.isInPit and not pitlimiter:
    stintinvalid = True
 
Top