+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: EGP Heading Indicator

  1. #1
    Wire Noob schmoller's Avatar
    Join Date
    Sep 2009
    Posts
    11

    Post EGP Heading Indicator

    Name: EGP Heading Indicator

    Description:
    This script shows the heading(Yaw) of the chip in a EGP screen using the same style as in airplanes

    How to Use:
    1. Place an EGP screen
    2. Use the Wirelink tool on the screen
    3. Place an E2 with this script somewhere
    4. Wire the S input on the chip to the screen

    Code:
    Code:
    @name Heading Indicator - by Schmoller
    @inputs S:wirelink
    @outputs 
    @persist 
    @trigger 
    
    interval(30)
    Heading = entity():angles():yaw() + 90
    Heading *= -1
    I = 0
    
    #Background and outline
    S:egpCircle(I,256,256,404,404,255,255,255,255)
    I++
    S:egpCircle(I,256,256,400,400,0,0,0,255)
    I++
    
    #Center Indicator
    S:egpTriangle(I,vec2(256-12,256+10),vec2(256,256-15),vec2(256+12,256+10),vec4(255,255,255,255))
    I++
    S:egpTriangle(I,vec2(256-10,256+8),vec2(256,256-13),vec2(256+10,256+8),vec4(0,0,0,255))
    I++
    
    S:egpLine(I,256,256 - 25,256,150,255,255,255,255)
    I++
    
    #Draw Heading
    
    H = 0
    O = 0
    
    while(H < 36)
    {
        D = 130
        if(O)
        {
            D = 140
        }
        S:egpLine(I,256 + D * sin(Heading - (10 * H)),256 + D * cos(Heading - (10 * H)),256 + 160 * sin(Heading - (10 * H)),256 + 160 * cos(Heading - (10 * H)),255,255,255,255)
        I++
        
        if(H == 0)
        {
            S:egpText(I,"N",256 + 180 * sin(Heading - (10 * H)),256 + 180 * cos(Heading - (10 * H)),255,255,255,255)
            S:egpSetFont(I,"arial",30)
            S:egpTextAlign(I,1,1)
            I++
        }
        elseif(H == 9)
        {
            S:egpText(I,"E",256 + 180 * sin(Heading - (10 * H)),256 + 180 * cos(Heading - (10 * H)),255,255,255,255)
            S:egpSetFont(I,"arial",30)
            S:egpTextAlign(I,1,1)
            I++
        }
        elseif(H == 18)
        {
            S:egpText(I,"S",256 + 180 * sin(Heading - (10 * H)),256 + 180 * cos(Heading - (10 * H)),255,255,255,255)
            S:egpSetFont(I,"arial",30)
            S:egpTextAlign(I,1,1)
            I++
        }
        elseif(H == 27)
        {
            S:egpText(I,"W",256 + 180 * sin(Heading - (10 * H)),256 + 180 * cos(Heading - (10 * H)),255,255,255,255)
            S:egpSetFont(I,"arial",30)
            S:egpTextAlign(I,1,1)
            I++
        }
        elseif(mod(H,3) == 0)
        {
            S:egpText(I,toString(H),256 + 180 * sin(Heading - (10 * H)),256 + 180 * cos(Heading - (10 * H)),255,255,255,255)
            S:egpSetFont(I,"arial",30)
            S:egpTextAlign(I,1,1)
            I++
        }
        
        
        H += 1.5
        O = !O
    }
    
    S:egpDraw()
    Screenshot:


  2. #2
    Banned SGT_KILL's Avatar
    Join Date
    Apr 2009
    Location
    Tasmania,Australia
    Posts
    86

    Default Re: EGP Heading Indicator

    at this rate every 1 is going to want EGP in the svn

    its starting to get used alot

  3. #3
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: EGP Heading Indicator

    You love EGP dont you? Your previous EGP artificial horizon was win, and this is too!
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  4. #4
    Banned SGT_KILL's Avatar
    Join Date
    Apr 2009
    Location
    Tasmania,Australia
    Posts
    86

    Default Re: EGP Heading Indicator

    I think he dose like it and he is dam good at it to. Darn Pitty there is no real tuts to learn it from its more like look at others and tinker with it to you work it out and that's not cool o well.

    on the other hand im on the hunt for a good tut to do some mouse aimed stuff while im sitting in a chair on top of the prop that's turning (its hard ) )

  5. #5
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: EGP Heading Indicator

    there isnt really anything you can learn from an EGP tut, the documentation is pretty simple and straight-forward. The thing that he does is use lots of maths, thats the hard part.
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  6. #6
    Wire Noob schmoller's Avatar
    Join Date
    Sep 2009
    Posts
    11

    Default Re: EGP Heading Indicator

    Quote Originally Posted by Unsmart View Post
    You love EGP dont you? Your previous EGP artificial horizon was win, and this is too!
    Thanks but I don't really love it, I only started using egp yesterday and while its good, its not great and there are too many limits

  7. #7
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: EGP Heading Indicator

    Limits such as?
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  8. #8
    Wire Noob schmoller's Avatar
    Join Date
    Sep 2009
    Posts
    11

    Default Re: EGP Heading Indicator

    The limit of 40 items that can be drawn, and not enough drawing functions. I know that the 40 item limit can be changed but only through the console and thats just annoying

  9. #9
    Wirererer Maxaxle's Avatar
    Join Date
    Sep 2009
    Posts
    177

    Default Re: EGP Heading Indicator

    I sense that this will be useful on jeeps...
    Still very clueless about code in general.
    92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.

  10. #10
    Wire Sofaking Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,357

    Default Re: EGP Heading Indicator

    Quote Originally Posted by schmoller View Post
    Thanks but I don't really love it, I only started using egp yesterday and while its good, its not great and there are too many limits
    I'm with you there.. I use EGP because it's useful for making quick contraptions (much quicker than CPU development time-wise).. but it's poorly implemented, buggy, and restrictive. Definitely a love/hate relationship with EGP.


    Nice heading display anyway.

+ Reply to Thread
Page 1 of 2 12 LastLast

LinkBacks (?)

  1. 02-13-2010, 08:17 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots