Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name ArenaMaker3000
- @persist Yaw LastPos:vector Pitch Dead Size Model:string PreProp:entity Speed
- if(!Dead)
- {
- interval(10)
- }
- else
- {
- runOnTick(1)
- runOnChat(1)
- }
- if(chatClk(owner()))
- {
- P = owner():lastSaid():lower():explode(" ")
- if(P[1, string] == "!speed")
- {
- Speed = P[2, string]:toNumber()
- }
- }
- if(first())
- {
- Speed = 0
- Size = 32
- #Model = "models/props_phx/construct/wood/wood_panel"+Size:toString()+"x"+Size:toString()+".mdl"
- Model = "models/hunter/plates/plate"+Size:toString()+"x"+Size:toString()+".mdl"
- Pitch = -15
- holoCreate(1, entity():pos() + vec(0, 0, 1250/8*Size))
- holoModel(1, Model)
- holoAng(1, ang())
- holoCreate(2, entity():pos() + vec(0, 0, 100))
- holoParent(2, 1)
- holoAlpha(1, 0)
- holoAlpha(2, 0)
- holoCreate(3, entity():pos())
- holoAng(3, ang())
- }
- while(propCanCreate() && perf() && !Dead)
- {
- Yaw++
- holoAng(1, ang(Pitch, Yaw, 0))
- Angle = (holoEntity(1):pos() - holoEntity(2):pos()):toAngle() + ang(90, 0 ,0)
- Pos = holoEntity(2):pos() - holoEntity(1):boxCenter():rotate(Angle)
- #if(Pos:distance(LastPos) >= 260/8*Size || first())
- #if(Pos:distance(LastPos) >= 200/8*Size || first())
- if(Pos:distance(LastPos) >= 200/8*Size || first())
- {
- E = propSpawn(Model, Pos, Angle, 1)
- #if(PreProp:isValid()){ weld(E, PreProp) }
- PreProp = E
- LastPos = Pos
- #E:setMaterial("models/debug/debugwhite")
- #E:setColor(hsv2rgb((Pitch / 180) * 360 + (abs(Yaw-180) / 180) * ((360/180)*180/(24 - sin(Pitch) * 13)), 1, 1))
- #E:setAlpha(20)
- #E:propNotSolid(1)
- E:parentTo(holoEntity(3))
- break
- }
- if(Yaw >= 360)
- {
- Pitch += 180/(24 - sin(Pitch) * 13)
- Yaw = 0
- if(Pitch > 190) # 0 single prop, 180 full sphere, 90 half sphere, 45 quarter sphere, etc
- #if(Pitch > 90) # 0 single prop, 180 full sphere, 90 half sphere, 45 quarter sphere, etc
- {
- Dead = 1
- }
- }
- }
- if(Dead)
- {
- holoAng(3, holoEntity(3):angles() + ang(0, Speed, 0))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement