CTDPworld Forums

The community, the place to discuss

Skip to content

VehicleScoringInfo.getNextBehind more details needed

Discuss our past or upcoming releases. You have questions concerning our Mods or our software? Ask right away…

Moderators: CoDan, BMWfan, Dahie, Marvin

VehicleScoringInfo.getNextBehind more details needed

Postby MerlinC » Sun Apr 21, 2013 9:49 am

Is the available methode getNextBehind() providing the VehicleScoringInfo class of the next vehicle on track - or just the next vehicle in the current ranking?

Need a methode to figure out the next vehicle on track independent from the actual position, e.g. if between the leader and the second place a lapped car is running I would like to get the info of the lapped car if I call vsi.getNextBehind(...) [vsi being the VehicleScoringInfo of the leader].

Any advise is appreciated. Thanks in advance.
Posts: 1
Joined: Fri Apr 19, 2013 7:20 am

Re: VehicleScoringInfo.getNextBehind more details needed

Postby Marvin » Sun Apr 28, 2013 3:30 pm

getNextBehind() provides you with the VehicleScoringInfo instance for the vehicle behind you in the current ranking.

To get the info, you desire, you would need to use vsi.getLapDistance() or vsi.getNormalizedLapDistance(). Of course you'd have to deal with the S/F line value flip situation. And don't forget to check the isInPits() flag.
Posts: 576
Joined: Thu May 28, 2009 11:12 pm
Location: Germany, near Cologne

Return to CTDP Modifications & Plugins

Who is online

Users browsing this forum: No registered users and 0 guests