Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 11 12 13 14 15 … 18 Next »
Running out of Ops when simply setting a holograms material
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Running out of Ops when simply setting a holograms material
02-10-2015, 10:10 PM,
#1
Destiny's Player Offline
A passing by member
***
Posts: 237
Threads: 35
Joined: Dec 2013
Running out of Ops when simply setting a holograms material
Basically that. What in the world?
Spoiler Expand

--@name Power Turbine
--@author The Next Decade
--@model models/hunter/blocks/cube025x025x025.mdl

Self = ents.self()
Owner = ents.owner()

SpawnFinished = 0

SelfPos = Self:pos()
SelfAng = Self:ang()
SelfCon = Self:getConstraints()

Spin1C = 0
Spin2C = 0
Spin3C = 0

Node = nil
WireNode = nil

Start = 0

function starting()
Turbine = holograms.create(SelfPos,SelfAng,"models/Mechanics/gears2/gear_12t3.mdl",Vector(1.3,1.3,2))
TurbineConfusedetMaterial("sprops/textures/sprops_chrome")

TurbinePower = holograms.create(SelfPos,SelfAng,"models/Mechanics/gears2/gear_12t3.mdl",Vector(1.5,1.5,2))
TurbinePowerConfusedetMaterial("models/alyx/emptool_glow")
TurbinePowerConfusedetColor(255,200,100)
TurbinePowerConfusedetAlpha(0)

BallPower = holograms.create(SelfPos,SelfAng,"models/sprops/geometry/sphere_84.mdl",0.9)
BallPowerConfusedetMaterial("models/alyx/emptool_glow")
BallPowerConfusedetColor(255,200,100)
BallPowerConfusedetAlpha(0)

BallFusion = holograms.create(SelfPos,SelfAng,"models/sprops/geometry/sphere_84.mdl",0.85)
BallFusionConfusedetMaterial("spacebuild/Fusion")
BallFusionConfusedetAlpha(0)

Sound1 = sounds.create(Self,"ambient/wind/underground_wind_lp_01.wav")
Sound2 = sounds.create(Self,"br/ambience/gas_release_lp.wav")

Sound1:play()
Sound2:play()

print("Hologram set up finished")
SpawnFinished = 1
end

starting()

if SpawnFinished == 1 then
SelfCon = Self:getConstraints()
local i = 0
timer.create("NodeGet",0.1,#SelfCon,function()
i = i+1
printConsole(SelfCon[i]:class())
if SelfCon[i]:class() == "stargazer_node" then
Node = SelfCon[i]
WireNode = Node:getWirelink()
print("Node Found")
Start = 1
timer.remove("NodeGet")
return
end
error("No node found")
end)

if Start ~= 0 then
timer.create("refresh",0.1,0,function()
if Node ~= nil and WireNode["Max Energy"] ~= 0 then
Sound1ConfusedetVolume(1/WireNode["Max Energy"]*WireNode["Energy"])
Sound2ConfusedetVolume(0.6/WireNode["Max Energy"]*WireNode["Energy"])
Sound2ConfusedetPitch(10/WireNode["Max Energy"]*WireNode["Energy"]+math.random(1))
AlphaFusion = 150/WireNode["Max Energy"]*WireNode["Energy"]
AlphaPower = 255/WireNode["Max Energy"]*WireNode["Energy"]
BallSize = 0.9+(math.random()/20)

Spin1 = 10/WireNode["Max Energy"]*WireNode["Energy"]
Spin1C = Spin1C + Spin1
Spin2 = 15/WireNode["Max Energy"]*WireNode["Energy"]
Spin2C = Spin2C + Spin2
Spin3 = 20/WireNode["Max Energy"]*WireNode["Energy"]
Spin3C = Spin3C + Spin3

if Spin1C > 360 then
Spin1C = 0
end
if Spin2C > 360 then
Spin2C = 0
end
if Spin3C > 360 then
Spin3C = 0
end

TurbineConfusedetAng(Angle(0,Spin3C,0))
TurbinePowerConfusedetAng(Angle(0,Spin3C,0))
TurbinePowerConfusedetAlpha(AlphaPower)

BallPowerConfusedetAng(Angle(Spin3C,Spin1C,Spin2C))
BallPowerConfusedetAlpha(AlphaPower)
BallPowerConfusedetScale(BallSize)
BallFusionConfusedetAng(Angle(Spin3C,Spin1C,Spin2C))
BallFusionConfusedetAlpha(AlphaFusion)
BallFusionConfusedetScale(BallSize-0.05)
end
end)
end
end
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Running out of Ops when simply setting a holograms material - by Destiny's Player - 02-10-2015, 10:10 PM
RE: Running out of Ops when simply setting a holograms material - by Person8880 - 03-10-2015, 10:52 AM
RE: Running out of Ops when simply setting a holograms material - by TheOneAndOnlyTee - 03-10-2015, 11:26 AM
RE: Running out of Ops when simply setting a holograms material - by Red The Blue Color - 03-10-2015, 03:35 PM
RE: Running out of Ops when simply setting a holograms material - by Destiny's Player - 03-10-2015, 04:21 PM
RE: Running out of Ops when simply setting a holograms material - by Person8880 - 03-10-2015, 05:03 PM
RE: Running out of Ops when simply setting a holograms material - by Destiny's Player - 03-10-2015, 05:30 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.