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

Register

Team Spartan Cookies & Milk Forums Garry's Mod Expression 2 v
« Previous 1 2 3 4 5 6 … 8 Next »
T-16's E2 Help & Request Thread
Thread Closed 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pages (6): « Previous 1 2 3 4 5 6
Threaded Mode
T-16's E2 Help & Request Thread
24-12-2015, 05:07 PM,
#51
mariofludd Offline
Novaaaaaaaaaaaaa
****
Posts: 528
Threads: 44
Joined: Dec 2013
RE: T-16's E2 Help & Request Thread
T-16? I don't see a T-16 anywhere... I only see a T-17. :33

[Image: efN9HsZ.png]
Find
24-12-2015, 05:28 PM,
#52
TheOneAndOnlyTee Offline
GMod Admin
Posts: 755
Threads: 47
Joined: Oct 2013
RE: T-16's E2 Help & Request Thread
;p, on another note for future requests I'm only going to do them if they're really easy to do.

Steam Profile
My Discord Server
Need help with E2 or SF? , just ask me and i'll try to help.
[Image: 98Dkcoz.gif]
Find
18-01-2016, 08:49 PM,
#53
warhammer Offline
TSCM Member
***
Posts: 63
Threads: 9
Joined: Nov 2014
RE: T-16's E2 Help & Request Thread
I dont know if this would be "realy" easy but could you make a radar screen that only shows ships so that a alarm or light flashes when another ship_core or other ship comes near to your ship?

It will flatten you
Find
18-01-2016, 08:51 PM,
#54
TheOneAndOnlyTee Offline
GMod Admin
Posts: 755
Threads: 47
Joined: Oct 2013
RE: T-16's E2 Help & Request Thread
If i get time i'll see what i can do, just a simple radar though.

Steam Profile
My Discord Server
Need help with E2 or SF? , just ask me and i'll try to help.
[Image: 98Dkcoz.gif]
Find
20-01-2016, 09:55 PM,
#55
warhammer Offline
TSCM Member
***
Posts: 63
Threads: 9
Joined: Nov 2014
RE: T-16's E2 Help & Request Thread
hows it coming?

It will flatten you
Find
20-01-2016, 10:38 PM,
#56
TheOneAndOnlyTee Offline
GMod Admin
Posts: 755
Threads: 47
Joined: Oct 2013
RE: T-16's E2 Help & Request Thread
Done, i threw the alarm on it out of gmod so idk if it'll sound right but it should.
When using this have a screen on an angle and the objects are relative to the screens direction like Pho's, as this was a quick one i just used the same radar code he did and to save some ops the button are slightly laggy so hold E for a second for it to work
Code:
@name Ship Radar by T-17 @inputs EGP:wirelink EnableAlarm @model @persist Ships:array Players:array E:entity Lines:vector Outline:vector Text:vector Mode interval(1000) if(first()|duped()|changed(EGP)){ ##Config Text = vec(255,255,255) #text color Outline = vec(0,164,255) #the main color Lines = vec(51,51,51) #background grid lines color Range = 2000 #radius to trigger alarm for shuttles ##END NO CHANGES BELOW, If you change stuff below then you lose the right to ask for help Mode = 1 E = EGP:entity() timer("ships",500) timer("preDraw",100) timer("buttoncheck",100) function number wirelink:button(Cursor:vector2,ID:number) { local BPos = This:egpPos(ID) local BSize = This:egpSize(ID)/2 local Pressed = inrange(Cursor,BPos-BSize,BPos+BSize) return Pressed } findExcludePlayerProps(owner()) findExcludeEntity(owner()) } if(clk("beep")){ if(EnableAlarm==1){ E:soundPlay(1,100,"st/misc/tng_redalert.wav") } } if(clk("ships")){ Ships = array() Players = array() findByClass("st_shuttle_*") Ships = findToArray() findByClass("player") Players = findToArray() timer("ships",4000) } ####DRAWING SHIPS/PLAYERS, this code is thanks to TSCM.Firestorm and TSCM.Alex5511. many use much thanks :P if(Mode==1){ for(I=1,Ships:count()){ Ship = Ships[I,entity] Dis = Ship:pos():distance(E:pos()) if(Dis<500 || Dis>5000 || Ship:pos()==vec(0,0,0)){EGP:egpRemove(200+I) EGP:egpRemove(100+I)}else{ if(Dis<Range){timer("beep",10)} Dif = Ship:pos() - E:pos() W = toRad(toDeg(atan(Dif:x(),Dif:y())) - toDeg(atan(E:eye():x(),E:eye():y()))) Org = sqrt(Dif:x()^2+Dif:y()^2) X = (sin(W)*Org)/4 Y = (-cos(W)*Org)/4 #X=sin(W)*Org #Y=-cos(W)*Org EGP:egpCircle(100+I,vec2(260+X/-2000*150,260+Y/-2000*150),vec2(2,2)) EGP:egpColor(100+I,teamColor(Ship:owner():team())) EGP:egpText(200+I,Ship:owner():name():left(10)+"'s ship" +" (" + round(Dis) + ")",vec2(275+X/-2000*150,255+Y/-2000*150)) EGP:egpSize(200+I,12) EGP:egpColor(200+I,teamColor(Ship:owner():team())) } } }else{ for(I=1,Players:count()){ Ply = Players[I,entity] Dis = Ply:pos():distance(E:pos()) if(Dis<200 || Dis>5000 || Ply:pos()==vec(0,0,0)){EGP:egpRemove(200+I) EGP:egpRemove(100+I)}else{ Dif = Ply:pos() - E:pos() W = toRad(toDeg(atan(Dif:x(),Dif:y())) - toDeg(atan(E:eye():x(),E:eye():y()))) Org = sqrt(Dif:x()^2+Dif:y()^2) X = (sin(W)*Org)/4 Y = (-cos(W)*Org)/4 #X=sin(W)*Org #Y=-cos(W)*Org EGP:egpCircle(100+I,vec2(260+X/-500*150,280+Y/-500*150),vec2(2,2)) EGP:egpColor(100+I,teamColor(Ply:team())) EGP:egpText(200+I,Ply:name():left(10)+" (" + round(Dis) + ")",vec2(265+X/-2000*150,255+Y/-2000*150)) EGP:egpSize(200+I,12) EGP:egpColor(200+I,teamColor(Ply:team())) } } } if(clk("preDraw")){ EGP:egpClear() EGP:egpBox(1,vec2(256,256),vec2(512,512)) EGP:egpColor(1,vec(31,31,31)) for(I=1,25){ local V = 512/25 EGP:egpLine(1+I,vec2(0,V*I),vec2(512,V*I)) EGP:egpColor(1+I,Lines) EGP:egpLine(27+I,vec2(V*I,0),vec2(V*I,512)) EGP:egpColor(27+I,Lines) } EGP:egpCircleOutline(52,vec2(256,256),vec2(2,2)) EGP:egpColor(52,Outline) EGP:egpText(53,"Ship Radar",vec2(20,20)) EGP:egpColor(53,Text) EGP:egpBox(54,vec2(60,492),vec2(120,40)) EGP:egpColor(54,Outline) EGP:egpBox(55,vec2(60,492),vec2(118,38)) EGP:egpColor(55,vec(31,31,31)) EGP:egpText(56,"Show Players",vec2(10,482)) EGP:egpColor(56,Text) } ##################### BUTTON CODE BY TSCM.BLACKHAWK, much easy many thanks :P if(clk("buttoncheck")){ User = EGP["User",entity] Use = User:keyUse() if(changed(Use) & Use){ Cursor = EGP:egpCursor(User) if(EGP:button(Cursor,55)){ if(Mode == 1){ for(I=1,20){ EGP:egpRemove(100+I) EGP:egpRemove(200+I) } EGP:egpSetText(56,"Show Ships") Mode = 0 }else{ for(I=1,20){ EGP:egpRemove(100+I) EGP:egpRemove(200+I) } EGP:egpSetText(56,"Show Players") Mode = 1 } } } timer("buttoncheck",200) }
If you ask me how to set this up or wire it, i will not respond.
Also i'm closing this thread because ew E2, if you need help with anything find me ingame (8pm - 7am / 4am - 11am +10:30GMT).

Steam Profile
My Discord Server
Need help with E2 or SF? , just ask me and i'll try to help.
[Image: 98Dkcoz.gif]
Find
« Next Oldest | Next Newest »
Pages (6): « Previous 1 2 3 4 5 6
Thread Closed 


  • 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.