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 … 14 15 16 17 18 Next »
Problems with an emitter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Problems with an emitter
18-04-2015, 10:19 PM, (This post was last modified: 18-04-2015, 10:34 PM by Destiny's Player.)
#1
Destiny's Player Offline
A passing by member
***
Posts: 237
Threads: 35
Joined: Dec 2013
Problems with an emitter
Good time of the day to everybody who reads this.

So, I have a few problems with this code.
1: It overloads and shutdowns, but that's not the main problem, I just didn't look into fixing it because of the second problem.
2: For some reason, the "if" argument near the end, that checks the "on" variable doesn't give me ANYTHING. Tried with a simple "else", tried with an "elseif On == 0", doesn't work, returns something that makes the render completely visible, not even at 200 Alpha.

Also, thank you to Black and Ia for trying to help me.


--@name Field Door HP
--@author TheNextDecade
--@sharedscreen

function Drawer(posy,posx,col,hp)
render.setColor(col[1]-100,col[2]-100,col[3]-100,col[4])
render.drawFilledCircle(60,63,22,22)
render.setColor(col[1]-150,col[2]-150,col[3]-150,col[4])
render.drawCircle(60,63,22,22)
render.setColor(col[1],col[2],col[3],col[4])
local Perc = 40/100*hp
render.drawRect(55,43,10,Perc)
render.drawRectOutline(55,43,10,40)
end


if SERVER then
wire.createInputs({"Active","HP"},{"normal","normal"})
hook("input","ActiveChange",function(Input,Value)
if Input == "Active" then
if net.start() then
net.setDTVar("Int", 1, Value)
net.broadcast()
end
end
end)
else
hook("net","RecieveString",function(Length)
On = net.getDTVar("Int",1)
end)
Itself = entsConfusedelf()
if On == 1 then
local Alpha = 200
elseif On == 0 then
local Alpha = 1
end

hook("render","Render",function()
render.start3D2D(Itself:pos(),Itself:ang(),1)
render.clear()
Drawer(60,63,{150,250,150,Alpha},100)
render.end3D2D()
end)
end
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Problems with an emitter - by Destiny's Player - 18-04-2015, 10:19 PM
RE: Problems with an emitter - by Person8880 - 19-04-2015, 11:28 AM
RE: Problems with an emitter - by Destiny's Player - 19-04-2015, 01:20 PM
RE: Problems with an emitter - by Person8880 - 19-04-2015, 01:51 PM
RE: Problems with an emitter - by Destiny's Player - 19-04-2015, 09:05 PM
RE: Problems with an emitter - by TheOneAndOnlyTee - 20-04-2015, 01:10 AM
RE: Problems with an emitter - by Person8880 - 20-04-2015, 07:33 PM
RE: Problems with an emitter - by Destiny's Player - 20-04-2015, 08:36 PM
RE: Problems with an emitter - by TheOneAndOnlyTee - 21-04-2015, 02:42 PM
RE: Problems with an emitter - by Destiny's Player - 21-04-2015, 02:51 PM
RE: Problems with an emitter - by LocInt - 21-04-2015, 05:32 PM
RE: Problems with an emitter - by Person8880 - 21-04-2015, 05:52 PM
RE: Problems with an emitter - by Destiny's Player - 21-04-2015, 06:23 PM
RE: Problems with an emitter - by Person8880 - 21-04-2015, 08:06 PM
RE: Problems with an emitter - by Destiny's Player - 21-04-2015, 08:22 PM
RE: Problems with an emitter - by Iajret - 21-04-2015, 09:41 PM
RE: Problems with an emitter - by LocInt - 22-04-2015, 05:18 AM
RE: Problems with an emitter - by Person8880 - 22-04-2015, 05:41 PM

  • View a Printable Version
Forum Jump:


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

Powered By MyBB, © 2002-2026 MyBB Group.