Cone Penalty in Scenarios?

Discussion in 'Content Creation' started by narrowsoul, Apr 30, 2016.

  1. narrowsoul

    narrowsoul
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    1
    I'm trying to make an autocross scenario in a parking lot on Utah, and I'm wondering if anyone here with more skills than myself would know how to code a cone penalty.

    Optimally it would be a penalty added to the finish time, but simply displaying a message during or after the race, or making the scenario fail when hitting a cone would all work.

    Thanks in advance, I'm really not a content creator, I just really want to drive an autocross course.
     
  2. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    If you just want the scenario to fail when you hit a cone, you can use the built-in nomoveGoal scenario setting. Have a look at the acceleration training scenario .json to see how it's done: the asterisk denotes "all other vehicles" (props are vehicles).

    If you want a time penalty, you'll have to track cone hits yourself. You can have a look at the nomoveGoal.lua scenario extension to see how you can track position to check if the cone has been moved. Tracking a time penalty (and displaying messages to this effect) which is added to the final time is then fairly simple: there are plenty of other scenarios that do their own time tracking for you to learn from.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice