1. Is there a way to mess with car headlights? Normal behaviour is that they turn off when the driver exits. Would like to turn them on and keep them on, without players.
     
  2. Yes it is possible, it depends on BaseEntity.Flags.Reserved2 (when it's true the lights are on)
     
  3. Possible if you reference the entity and use reflection to change its value.
    Code:
    // BaseCar : BaseWheeledVehicle
    private bool lightsOn = true;
    [DOUBLEPOST=1527374377][/DOUBLEPOST]
    You can do that but it would just turn them off next fixed update...
     
  4. That was just a hint... Also changing the lightsOn bool does nothing, it's value changes when player presses F, it's the
    Code:
    base.SetFlag(BaseEntity.Flags.Reserved2, (!this.IsMounted() ? false : this.lightsOn), false);
    that changes whether the lights are on or off
    Edit: which is inside FixedUpdate
     
  5. So it'd update for whatever lightsOn is set to next fixed update? :p
     
  6. In case there's a driver inside, yes :)
     
  7. Awesome, thanks! Going to try to keep all the car headlights on forever to be used as spotlights at night.
     
  8. FixedUpdate continues to turn the lights back off. Frowny face. Maybe have to put a crash test dummy in the driver seat to trick it.
     
  9. Putting a player in the driver seat would work, I've tried it, but then the engine gets turned on and there's a player in the seat which you have to kill if you want to get in... There is a better way to do it, hint: MonoBehaviour
     
  10. So, something like class HeadLightController : MonoBehaviour then attach it to the car with .AddComponent<HeadLightController>, and that overrides what the car does on FixedUpdate? I'm really new to this, slowly learning. Yesterday I actually decompiled crap to get my Free Research plugin going.
     
  11. Yes, that's how i did it