![]() |
|
Destiny's E2 Lab - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Expression 2 (https://teamscm.co.uk/forum-6.html) +--- Thread: Destiny's E2 Lab (/thread-210.html) |
Destiny's E2 Lab - Destiny's Player - 23-01-2014 As you probably have guessed, I'm going to publish my E2's here. Just because I don't like spawning threads. {______/\____[Reverend Status Screen]____/\______} Just a basic Status screen with an unworking alarm, and without pushable buttons. Nothing fancy. Code: @name Reverend Status
@inputs [E,Ship,Shield]:wirelink User:entity
@outputs ShipOut:array
@persist HealthM HealthP
@trigger
@model models/slyfo_2/acc_sci_coolerator.mdl
interval(100)
ShipOut=Ship:outputs()
HealthM=359-(359/Ship["Max Health",number]*Ship["Health",number])
HealthP=(100/Ship["Max Health",number]*Ship["Health",number])
if(first())
{
E:egpClear()
E:egpRoundedBox(1,vec2(255,255),vec2(400,400))
E:egpColor(1,vec(70,70,70))
E:egpRoundedBoxOutline(2,vec2(255,255),vec2(400,400))
#Health
E:egpCircle(3,vec2(255,150),vec2(90,90))
E:egpWedge(4,vec2(255,150),vec2(90,90))
E:egpCircle(5,vec2(255,150),vec2(45,45))
E:egpCircleOutline(6,vec2(255,150),vec2(90,90))
E:egpCircleOutline(7,vec2(255,150),vec2(45,45))
E:egpColor(3,vec(150,150,150))
E:egpColor(4,vec(50,100,50))
E:egpColor(5,vec(125,125,125))
E:egpText(8,"100%",vec2(255,150))
E:egpAlign(8,1,1)
E:egpSize(8,30)
E:egpSize(4,359)
E:egpCircle(9,vec2(255,150),vec2(90,90))
E:egpColor(9,vec(100,200,200))
E:egpAlpha(9,100)
E:egpText(10,"100%",vec2(255,125))
E:egpAlign(10,1,1)
#Shield
E:egpRoundedBox(20,vec2(255,345),vec2(162,132))
E:egpColor(20,vec(125,125,125))
E:egpRoundedBox(11,vec2(255,320),vec2(40,100))
E:egpAngle(11,270)
E:egpColor(11,vec(100,175,175))
E:egpRoundedBox(12,vec2(255,370),vec2(40,100))
E:egpAngle(12,90)
E:egpColor(12,vec(100,175,175))
E:egpRoundedBox(13,vec2(255,290),vec2(20,160))
E:egpAngle(13,270)
E:egpRoundedBox(14,vec2(255,400),vec2(20,160))
E:egpAngle(14,90)
E:egpRoundedBox(15,vec2(185,345),vec2(20,130))
E:egpRoundedBox(16,vec2(325,345),vec2(20,130))
E:egpAngle(16,180)
E:egpRoundedBoxOutline(21,vec2(255,345),vec2(162,132))
E:egpRoundedBoxOutline(22,vec2(255,320),vec2(100,40))
E:egpAlpha(22,100)
E:egpRoundedBoxOutline(23,vec2(255,370),vec2(100,40))
E:egpAlpha(23,100)
for(I=0,4)
{
local N=13+I
E:egpColor(N,vec(100,200,200))
E:egpMaterial(N,"gui/gradient")
}
#ShieldButton
E:egpRoundedBox(30,vec2(370,345),vec2(50,50))
E:egpColor(30,vec(10,50,50))
E:egpRoundedBoxOutline(31,vec2(370,345),vec2(50,50))
E:egpText(32,"OFF",vec2(370,345))
E:egpAlign(32,1,1)
E:egpSize(32,27)
E:egpColor(32,vec(10,100,100))
E:egpLine(33,vec2(345,345),vec2(337,345))
E:egpSize(33,5)
#Decor
E:egpRoundedBox(40,vec2(110,255),vec2(50,350))
E:egpColor(40,vec(40,40,40))
E:egpRoundedBoxOutline(41,vec2(110,255),vec2(50,350))
for(I=0,5)
{
E:egpText(42+I,"9",vec2(110,122+(I*55)))
E:egpFont(42+I,"anquietas")
E:egpAlign(42+I,1,1)
E:egpSize(42+I,60)
E:egpColor(42+I,vec(100,150,150))
}
}
if(Shield["Active",number]==0)
{
E:egpColor(30,vec(10,50,50))
E:egpColor(32,vec(10,100,100))
E:egpSetText(32,"OFF")
}
elseif(Shield["Active",number]==1)
{
E:egpColor(30,vec(100,200,200))
E:egpColor(32,vec(100,250,250))
E:egpSetText(32,"ON")
}
#Shield
E:egpAlpha(11,255/100*(Shield["Up",number]/100))
E:egpAlpha(12,255/100*(Shield["Down",number]/100))
E:egpAlpha(13,255/100*(Shield["Front",number]/100))
E:egpAlpha(14,255/100*(Shield["Back",number]/100))
E:egpAlpha(15,255/100*(Shield["Left",number]/100))
E:egpAlpha(16,255/100*(Shield["Right",number]/100))
E:egpSize(4,HealthM)
E:egpSetText(8,floor(HealthP):toString() + "%")
E:egpSetText(10,floor(Ship["Shield",number]):toString() + "%")
E:egpAlpha(9,Ship["Shield",number])
E:egpAlpha(10,Ship["Shield",number])
for(I=0,5)
{
E:egpSetText(42+I,floor(random(0,9)):toString())
}
if(changed(Ship["Shield",number]<10) & Ship["Shield",number]<10)
{
soundPlay(1,0,"alarm/sgc_alarm.wav")
} |