• Dear visitors,

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

    Team ACM.

QUESTION Different objects for trackday mode?

jpsdesign

New Member
Just wondering if it's possible either via ext. config or Lua to have different objects appear only in track day mode? - I initially thought I might be able to cheat it with the 'Garage doors' function but think that only works on the basis of car / no car (or AC_crew / no AC_Crew). On the 90s version of my Thruxton mod I'm working on I'd like to have different objects placed in the paddock in trackday mode when 'Hide Crew in trackday' is selected but am coming up blank on ways to achieve this...
 

jpsdesign

New Member
Managed to get this working as found some stuff on the CSP Discord from @Johnr777 so hope you don't mind if I used this from Road Atlanta:

local meshes1 = ac.findMeshes("Test_tent")

if ac.getSessionName() == "car" then
meshes1:setVisible(true)

else if ac.getSessionName() ~= "car" then
meshes1:setVisible(false)
end
end

What I don't understand however is how 'car' relates to 'track day' as a session name, if I tried with 'track day' or 'practice' it didn't seem work. I did try scouring github and discord for the session names but not sure how / where they are defined?
 
Last edited:

Johnr777

Moderator
Managed to get this working as found some stuff on the CSP Discord from @Johnr777 so hope you don't mind if I used this from Road Atlanta:

local meshes1 = ac.findMeshes("Test_tent")

if ac.getSessionName() == "car" then
meshes1:setVisible(true)

else if ac.getSessionName() ~= "car" then
meshes1:setVisible(false)
end
end

What I don't understand however is how 'car' relates to 'track day' as a session name, if I tried with 'track day' or 'practice' it didn't seem work. I did try scouring github and discord for the session names but not sure how / where they are defined?
You can usually put in a debug line in the script to pull up information:
Example:
ac.debug("session name", ac.getSessionName())

Then when you run the game, open up Lua Debug app, find your script and look at debug line.

Its case sensitive, so Practice should have worked, instead of practice.

Hope this helps and feel free to use any of my scripts!

upload_2023-12-30_20-55-6.png
 
Top