Java/NCALC-Function...
 
Notifications
Clear all

Java/NCALC-Functions are not working for "Needle" Properties of Dial gauge

1 Posts
1 Users
0 Reactions
312 Views
(@blech)
Active Member
Joined: 3 years ago
Posts: 2
Topic starter  

Hi guys,

i'm working on an overlay project for the game ACC, where i am using the dial gauge and i want to use the needle properties, e.g. ShowNeedle, NeedleThickness and so on. I want to write a javascript or ncalc to enable/disable the needle under certain conditions. However, this is not working. Its not my first project in javascript.

I was testing my script ingame and let the javascript-simhub window open to check the "raw result" in realtime, which has shown a "0" for the ShowNeedle-Property. I was expecting that the Needle would be disappear, but nothing happend. I have used the same javascript in the same project to make the whole Dial gauge invisible (Property: "Visible"): It worked! 🙁

Program code is quite simple:

if ($prop('TrackPositionPercent') < 0.05){
    return 0
} else {
    return 1
}

I assume there is an issue with the software. Maybe nobody else has used it? Idk.

In the following just a few information about the project (maybe someone of you have a better idea to realise it):

I want to create an track layout overlay with an additional fictive car, which represents the position of my car after a pitstop. In general something like the "circle of doom" most people know from the formula 1. However, my idea was to manipulate the Dial gauge: Create a circle (which corresponds to my track layout) and use an image (just a dot) as needle, which represents a car on the circle. The information of the position of the cars (percentage) is available as telemetry data. My first try works quite well, but, when a car reaches the end of the lap and the track percentage value reaches 1, it changes its value to 0. This switch from 1 to 0 leads to an animation of die "Dial gauge" that the needle (in my situation the image) spin one rotation back to the beginning of the Dial gauge. What i am searching for at the moment is: how to disable the animation or make it disappear?

There for my idea was to make the needle invisible during this 1 sec. Hope you could follow my words!

Best,
Jakob

 

 

 

 


   
Quote
Share: