Home Showcase
Welcome to the new Diaspora forums, please let us know if you see anything broken! Notice: Some users may need to reupload their avatars due to an issue during forum setup!

E2 egp radar

SweetOneSweetOne Registered Posts: 39
edited January 2014 in Showcase #1
Hello!

Bringing you my E2 egp radar.

Enjoy!
@name Sweetones_Radar
@inputs EGP:wirelink 
@outputs I2 Size
@persist Players:array Dvec:vector Range I Counter FoundEnts:array I2 Ranger:ranger Dist:vector


interval(1000)

if( first() | dupefinished()){
    
    I=0
    I2=0
    Range = 20000
    EGP:egpClear()

    EGP:egpCircle(3, vec2(256,256), vec2(1,1))
    EGP:egpColor(3, vec(0,0,0))
      
    EGP:egpCircle(4, vec2(256,256), vec2(3,3))
    EGP:egpColor(4, vec(0,0,0))
    
    Players = players()

}

EGP:egpBox(19,vec2(250,250),vec2(1500,440))
EGP:egpColor(19,vec(0,144,255))
EGP:egpMaterial(19,"gui/center_gradient")
EGP:egpAlpha(19,99)
EGP:egpAngle(3, 270+entity():isWeldedTo():angles():yaw())
EGP:egpAngle(4, 270+entity():isWeldedTo():angles():yaw())

if(I<=players():count()){
    I++
}
if(I>players():count()){
    I=1
}

DVec = Players[I, entity]:pos() - entity():pos()
EGP:egpCircle(5+I, vec2( DVec:x()/Range*256 , -DVec:y()/Range*256 ) , vec2(2,2))
EGP:egpText(6 + maxPlayers() + I, Players[I, entity]:name(), vec2( DVec:x()/Range*256 , -DVec:y()/Range*256 ))
EGP:egpColor(5+I, teamColor(Players[I, entity]:team()))
EGP:egpColor(6 + maxPlayers() + I, teamColor(Players[I, entity]:team()))
EGP:egpAngle(6 + maxPlayers() + I, 270+entity():isWeldedTo():angles():yaw())
EGP:egpParent(5+I, 3)
EGP:egpParent(6+maxPlayers()+I, 3)
          
findByClass("ship_core*") 
FoundEnts = findToArray()  

if(I2<=FoundEnts:count()){
    I2++
}

if(I2>FoundEnts:count()){
    I2=0
}
    
DVec2 = FoundEnts[I2, entity]:pos() - entity():pos()
EGP:egpCircle(22+I2, vec2( DVec2:x()/Range*256 , -DVec2:y()/Range*256 ) , vec2(5,5))
EGP:egpText(23 + FoundEnts:count() + I2,FoundEnts[I2, entity]:owner():name()+" ["+round((FoundEnts[I2, entity]:getShield():toString():toNumber()
+FoundEnts[I2, entity]:getArmor():toString():toNumber()+FoundEnts[I2, entity]:getHull():toString():toNumber())/1000000,3):toString()+"]",
vec2( DVec2:x()/Range*256 , -DVec2:y()/Range*256 ))
EGP:egpAngle(23 + FoundEnts:count() + I2, 270+entity():isWeldedTo():angles():yaw())
EGP:egpParent(22+I2, 4)
EGP:egpParent(23+FoundEnts:count()+I2, 4)


 

 


Comments

  • NinjrKillrNinjrKillr Registered Posts: 175
    A note about using EGP: Try to make sure you only ever update things when it's actually changed, as well as endeavouring to only ever use object creation functions (such as EGP:egpCircle()) once, then using the updating functions to change stuff when needed. It's a lot more efficient for your E2, and a lot less harsh on the server / other players.

    "We fear that which we cannot see... we respect that which we cannot see... thus the blade will be wielded."

    Urahara_Bleach_Signature_by_Harty73.png
  • SweetOneSweetOne Registered Posts: 39
    NinjrKillr wrote:
    A note about using EGP: Try to make sure you only ever update things when it's actually changed, as well as endeavouring to only ever use object creation functions (such as EGP:egpCircle()) once, then using the updating functions to change stuff when needed. It's a lot more efficient for your E2, and a lot less harsh on the server / other players.

    Feel free to post your modified version of this. :)
  • NinjrKillrNinjrKillr Registered Posts: 175
    SweetOne wrote:
    Feel free to post your modified version of this. :)
    Lol. That ain't how feedback works, my friend.

    "We fear that which we cannot see... we respect that which we cannot see... thus the blade will be wielded."

    Urahara_Bleach_Signature_by_Harty73.png

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file