Hi guys help please
in a quick race
grid type
CM cant find (same racing class gt3/gt2) filter
what i missed thxs
In GridTypes.json, you can see that it's looking for tags:
"id": "same_racing_class_gt3_gt2_",
"name": "Same racing class (GT3/GT2/…)",
"filter": "class:race",
"script": "
-- tags to search for
classes = { 'gt3', 'gt2', '#GT4', '#90s touring' }
-- try to find some tag in selected car
racingclass = nil
for i, cl in ipairs(classes) do
if selected.Tags:ContainsIgnoringCase(cl) then
racingclass = cl
break
end
end
-- logging
if racingclass ~= nil then
log('selected class: ' .. racingclass)
else
log('selected class: NIL')
end
-- in case there is no any tag at all, result is false
if racingclass == nil then
error('Can’t detect selected car’s racing class')
return false
end
You either have to add more tags to this code here or you can do what I do and add tags that have a pound sign before them to each car.
Like - #GT3, #GT1, #94 DTM, #Trucks and so on.
Then you can select the "Same Subclass Only" category and it will draw from each car that has the same tag proceeded by a "#" sign. This way here means you're going to have to do some work but when you get it all done, it works really good and allows for easy quick grids that CM randomly picks instead of having to select each and every car to race against.