Nicely done, I was playing with this on NikoKun's server, and we were messing with feha's minesweeper.
Good job on egp!
Here is a place we can show of EGP based e2's.
Lets prove the haters wrong.
if yuo dont know what EGP is go here: http://www.wiremod.com/forum/e2-deve...processor.html
Wiremod.com Forums - EGP Supporters
ill start with my Spermdar.
[highlight=e2]
@name SPERMDAR
@inputs X:wirelink
@persist A:array C I
interval(1)
timer("A",1000)
timer("B",100)
V = vec()
if( clk("A") )
{
findIncludeClass("player")
findIncludeClass("npc*")
findInSphere(V,15000)
findSortByDistance(V)
A = findToArray()
C = A:count()+1
}
I=1
K=4
X:egpCircle(1,vec2(),vec2(512,512),vec4(0,255,0,25 5))
X:egpCircle(2,vec2(6,6),vec2(500,500),vec4(0,0,0,2 55))
while(I<C)
{
P = A[I,entity]
Pos = (Pos() - V) / 30
Pos2 = vec2( Pos:x() , Pos:y() ) / 2
Pos2 = Pos2 + vec2( 253 , 253 )
X:egpCircle(K,Pos2,vec2(6,6),teamColor(P:team()),5 0)
Pos3 = -vec2( P:eye():x() , P:eye():y() ) * 10
Pos3 = Pos3 + Pos2
X:egpLine(K+1,Pos2 + vec2(3,3) , Pos3 + vec2(3,3),teamColor(P:team()),10)
I++
K+=2
}
X:egpDraw()
X:egpClear()
[/highlight]
Last edited by goluch; 12-17-2009 at 05:03 AM.
Nicely done, I was playing with this on NikoKun's server, and we were messing with feha's minesweeper.
Good job on egp!
"I like pie"-Jat Goodwin
<Azrael-> ryland: LOL is such a noobish thing to say.
<ryland> LOL
<Fox682> LOLLOL
<Fox682> LOL
<ryland> LOL
Well...
I loaded this in SP, and got spammed with queued usermessages because it was writing to the screen constantly.
However, it's certainly a promising start.
I removed the timers and made it run on interval 1000. I then put in some basic support to change the dot color to represent NPC health. Fun times.
It's a lot of fun if you set V to be the owner's position and set up an RT camera on it.
Fun times, I've been trying to start using EGP a little, always good to find more examples. ^_^
If I can make anything neat after I've figured this out, I'll try postin it.
------------------------------------
aka "Nik of the Wired" in gmod.
screenshots would be nice
ЗАГРУЗКА...................
Ugh, I'm tired of people posting stuff about EGP without screenshots, I'm not going to download an addon unless I see what it's like first. Even the creator of it hasn't posted 1 screenshot!
Yeah, I felt the same way, but just kinda said screw it and downloaded it anyway.
I made a simple percent bars thing that can display up to 3 bars at a time
PHP Code:@name
@inputs EGP:wirelink A Amax Aname:string B Bmax Bname:string C Cmax Cname:string
@outputs
@persist Space I
@trigger
interval(200)
##Blank screen if no values are wired
if(Amax==0 & Bmax==0 & Cmax==0 & I<=50 | first())
{
while(I<=50){
EGP:egpRemove(I)
I++
Space=50
}
}
if(Amax!=0)
{
if(Aname==""){Aname="Value A"}
PCA=round((100/Amax)*A,3)
ColorA=hsv2rgb(vec((120/100)*PCA,1,1))
EGP:egpBoxoutline(1,vec2(100,100),vec2(400,70),vec4(255,255,255,255))
EGP:egpText(2,toString(PCA)+"%",vec2(8,112),ColorA,255)
EGP:egpText(3,Aname,vec2(100,80),vec4(255,255,255,255))
EGP:egpBox(4,vec2(101,101),vec2((398/Amax)*A,68),ColorA,255)
}
if(Bmax!=0)
{
if(Bname==""){Bname="Value B"}
PCB=round((100/Bmax)*B,3)
ColorB=hsv2rgb(vec((120/100)*PCB,1,1))
EGP:egpBoxoutline(5,vec2(100,200+Space),vec2(400,70),vec4(255,255,255,255))
EGP:egpText(6,toString(PCB)+"%",vec2(8,222+Space),ColorB,255)
EGP:egpText(7,Bname,vec2(100,180+Space),vec4(255,255,255,255))
EGP:egpBox(8,vec2(101,191+Space),vec2((398/Bmax)*B,68),ColorB,255)
}
if(Cmax!=0)
{
if(Cname==""){Cname="Value C"}
PCC=round((100/Cmax)*C,3)
ColorC=hsv2rgb(vec((120/100)*PCC,1,1))
EGP:egpBoxoutline(9,vec2(100,300+Space*2),vec2(400,70),vec4(255,255,255,255))
EGP:egpText(10,toString(PCC)+"%",vec2(8,332+Space*2),ColorC,255)
EGP:egpText(11,Cname,vec2(100,280+Space*2),vec4(255,255,255,255))
EGP:egpBox(12,vec2(101,291+Space*2),vec2((398/Cmax)*C,68),ColorC,255)
}
EGP:egpText(40,"EGP percent bars made by: Jacoby6000",20,0,0,255,0,255)
EGP:egpDraw()
--Orson Scott CardIn [his] experience that was a sentence never to be uttered except to prove its own inaccuracyI'm not stupid!
I made a flatgrass minimap
[highlight=e2]
@name
@inputs WL:wirelink
@outputs
@persist NP T C
@trigger
interval(80)
if(first()){
O=owner()
E=entity():isConstrainedTo()
WL:egpClear()
WL:egpBox(0,0,0,512,512,0,200,0,255)
WL:egpDraw()
}
if(WL:egpDraw()){
findByClass("player")
if($NP!=0){WL:egpClear()}
for(I=1,numPlayers()){
P=findResult(I)
D=256/12059
WL:egpCircle(I,D*Pos():x()+256,D*P
os():y()+256,10,10,255,255,255,255)
if(P==owner()){
WL:egpColor(I,vec4(hsv2rgb(vec(T,1,1)),255))
WL:egpText(I+20,P:name(),vec2(D*Pos():x()+256-(P:name():length()*3),D*P
os():y()+265),vec4(hsv2rgb(vec(C*2,1,1)),255))
}else{
WL:egpColor(I,vec4(hsv2rgb(vec((360/numPlayers())*I,1,1)),255))
WL:egpText(I+20,P:name(),vec2(D*Pos():x()+256-(P:name():length()*3),D*P
os():y()+265),vec4(teamColor(P:team()),255))
}
WL:egpSetFont(I+20,"trebuchet",15)
T++
C++
if(C>180){C=0}
if(T>360){T=0}
}
WL:egpDraw()
}
NP=numPlayers()
[/highlight]
--Orson Scott CardIn [his] experience that was a sentence never to be uttered except to prove its own inaccuracyI'm not stupid!
Bookmarks