Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Crane
- @inputs
- @outputs
- @persist Platform:entity IsWalking
- @trigger
- if(first())
- {
- runOnTick(1)
- function void init()
- {
- entity():setMass(0)
- entity():setColor(0,0,0,0)
- entity():propNotSolid(1)
- Platform = propSpawn("models/hunter/tubes/circle4x4.mdl", 1)
- Platform:setColor(0,0,0,0)
- IsWalking = owner():pos():length()
- }
- function void updateOnTick()
- {
- if(($IsWalking != 0) && owner():eyeAngles():pitch() >= 20)
- {
- Platform:setPos(owner():pos() - vec(0,0,Platform:boxMax():z() + ((owner():eyeAngles():pitch() - 20)/69)*25))
- }
- else
- {
- Platform:setPos(owner():pos() - vec(0,0,Platform:boxMax():z() - 0.15))
- }
- Platform:propFreeze(1)
- entity():setAng(ang(0,0,0))
- IsWalking = owner():pos():length()
- }
- init()
- }
- updateOnTick()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement