@name dir_test
@inputs Vehicle:entity Camera:wirelink
@outputs 
@persist Driver:entity Entity:entity
@trigger none
@model models/maxofs2d/cube_tool.mdl


if ( first() ) {
    
    Entity = entity()
    
    Camera["Distance", number] = 100
    Camera["Parent", entity]   = Entity
    Camera["Position", vector] = vec(0, 0, 20)   

}

interval( 60 )

Driver = Vehicle:driver()

if ( Driver ) {
    
    local W = Driver:keyForward()
    local A = Driver:keyLeft()
    local S = Driver:keyBack()
    local D = Driver:keyRight()
    
    
}

if ( !Entity:isPlayerHolding() ) {
    Entity:propFreeze(1)
}

Camera["Activated", number] = Driver:isValid()
