Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Simple Shift Light
- @inputs Engine:entity
- @persist Q
- interval(100)
- if(first()|dupefinished())
- {
- Scale = 1
- Invert = 1
- #############################################################################################
- #[
- Created by DatAmazingCheese
- Distribute if you want to. Don't claim as your own.
- The first light will turn green when you enter your engines powerband, the other 2 green lights
- will turn green at 3rds until you reach your powerband.
- Once you reach your engines max powerband the yellow light will turn on. This is the best time
- to shift gears.
- When you are near or at your redline, the red light will flash.
- When there are no lights on, it is best to downshift to stay in powerband!
- ]#
- #############################################################################################
- I = 1
- entity():setAlpha(0)
- holoCreate(I) #Base
- holoParent(I, entity())
- holoColor(I, vec(255, 255, 255))
- holoAlpha(I, 255)
- holoScale(I, vec(1, 1, 1)*Scale)
- holoPos(I, entity():toWorld(vec(1.4, 0, 0)*Scale))
- holoAng(I, entity():toWorld(ang(-90, 0, 0)))
- holoMaterial(I, "")
- holoModel(I, "models/wingf0x/hdmisocket.mdl")
- holoSkin(I, 0)
- I++
- holoCreate(I) #Light 1
- holoParent(I, entity())
- holoAlpha(I, 255)
- #holoColor(I,vec(0, 255, 63))
- holoScale(I, vec(0.075, 0.075, 0.075)*Scale)
- holoPos(I, entity():toWorld(vec(1.3999, (abs(-2)-abs(-2*2)*Invert)*-((abs(-2)+2)/(abs(-2)*2))+(abs(-2)-abs(-2*2)*Invert)*((abs(-2)-2)/(abs(-2)*2)), 0.5)*Scale))
- holoAng(I, entity():toWorld(ang(0, 0, 0)))
- holoMaterial(I, "")
- holoModel(I, "models/holograms/icosphere3.mdl")
- holoSkin(I, 0)
- I++
- holoCreate(I) #Light 2
- holoParent(I, entity())
- holoAlpha(I, 255)
- #holoColor(I,vec(0, 255, 63))
- holoScale(I, vec(0.075, 0.075, 0.075)*Scale)
- holoPos(I, entity():toWorld(vec(1.3999, (abs(-1)-abs(-1*2)*Invert)*-((abs(-1)+1)/(abs(-1)*2))+(abs(-1)-abs(-1*2)*Invert)*((abs(-1)-1)/(abs(-1)*2)), 0.5)*Scale))
- holoAng(I, entity():toWorld(ang(0, 0, 0)))
- holoMaterial(I, "")
- holoModel(I, "models/holograms/icosphere3.mdl")
- holoSkin(I, 0)
- I++
- holoCreate(I) #Light 3
- holoParent(I, entity())
- holoAlpha(I, 255)
- #holoColor(I,vec(0, 255, 63))
- holoScale(I, vec(0.075, 0.075, 0.075)*Scale)
- holoPos(I, entity():toWorld(vec(1.4, 0, 0.5)*Scale))
- holoAng(I, entity():toWorld(ang(0, 0, 0)))
- holoMaterial(I, "")
- holoModel(I, "models/holograms/icosphere3.mdl")
- holoSkin(I, 0)
- I++
- holoCreate(I) #Light 4
- holoParent(I, entity())
- holoAlpha(I, 255)
- #holoColor(I,vec(255, 191, 0))
- holoScale(I, vec(0.075, 0.075, 0.075)*Scale)
- holoPos(I, entity():toWorld(vec(1.4, abs(1)-abs(1*2)*Invert, 0.5)*Scale))
- holoAng(I, entity():toWorld(ang(0, 0, 0)))
- holoMaterial(I, "")
- holoModel(I, "models/holograms/icosphere3.mdl")
- holoSkin(I, 0)
- I++
- holoCreate(I) #Light 5
- holoParent(I, entity())
- holoAlpha(I, 255)
- #holoColor(I,vec(255, 0, 0))
- holoScale(I, vec(0.075, 0.075, 0.075)*Scale)
- holoPos(I, entity():toWorld(vec(1.4, abs(2)-abs(2*2)*Invert, 0.5)*Scale))
- holoAng(I, entity():toWorld(ang(0, 0, 0)))
- holoMaterial(I, "")
- holoModel(I, "models/holograms/icosphere3.mdl")
- holoSkin(I, 0)
- I++
- }
- ### First Green Light
- if(Engine:acfRPM()>(Engine:acfPowerbandMin()))
- {
- holoDisableShading(2,1)
- holoColor(2,vec(0, 255, 63))
- }else{
- holoDisableShading(2,0)
- holoColor(2,vec(60, 60, 60))
- }
- ### Second Green Light
- if(Engine:acfRPM()>(Engine:acfPowerbandMax()-Engine:acfPowerbandMin())*1.9)
- {
- holoDisableShading(3,1)
- holoColor(3,vec(0, 255, 63))
- }else{
- holoDisableShading(3,0)
- holoColor(3,vec(60, 60, 60))
- }
- ### Third Green Light
- if(Engine:acfRPM()>(Engine:acfPowerbandMax()-Engine:acfPowerbandMin())*2.3)
- {
- holoDisableShading(4,1)
- holoColor(4,vec(0, 255, 63))
- }else{
- holoDisableShading(4,0)
- holoColor(4,vec(60, 60, 60))
- }
- ### Shift Light
- if(Engine:acfRPM()>(Engine:acfPowerbandMax()))
- {
- holoDisableShading(5,1)
- holoColor(5,vec(255, 191, 0))
- }else{
- holoDisableShading(5,0)
- holoColor(5,vec(60, 60, 60))
- }
- ### Redline Light
- timer("redline",100)
- if(clk("redline"))
- {
- Q++
- }
- if(Engine:acfRPM()>(Engine:acfRedline()/1.17))
- {
- if(Q>1){Q=0}
- holoColor(6,vec(255, 0, 0))
- }else{
- holoDisableShading(6,0)
- holoColor(6,vec(60, 60, 60))
- }
- holoDisableShading(6,Q)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement