1. Post #321
    TO SOME- THING
    Steven :D's Avatar
    September 2009
    3,999 Posts
    Could anyone be assed to put all working E2's into some kind of folder and upload it?

  2. Post #322
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Hi again, Divran!
    Sorry to ask for another E2 (well, two actually. :T).
    The first one is more of a question/request.

    When I was making a Vtol, I got it all stable, and its hovering, but it keeps drifting..like it has no air resistance. I tried Hoverballs, but then it was harder to make it go...well..vertical. So, in short, what I'm asking for is an E2 that will provide Air Resistance, like a Hoverball's.
    Code:
    E:applyForce(-E:vel()*E:mass()*Multiplier)
    My second request is a bit hard to explain, so you don't have to do it if you want. I'm thinking it would require applyTorque, but I may be wrong.
    Did you ever see one of those Vtols with two "wheels" on the side? It would look something like this from an overhead view. O-T-O ,where T is the body, and the two circles on each side are "wheels" which rotate on an axis, providing thrust in different angles. So, what I'm trying to ask is prehaps an E2 that will rotate the two axis'd 'wheels' a little bit forwards or backwards, but not all the way. Eg: No more then a 90 degree angle back and forth. Thank-you! :D

    (Sorry it's really long. x_x')
    You could use either applyTorque or applyAngForce for this. You could take a look at this:
    http://www.wiremod.com/forum/contrap...tml#post136209
    and
    http://www.wiremod.com/forum/contrap...tml#post150097

    Edited:

    Could anyone be assed to put all working E2's into some kind of folder and upload it?
    No, not really

  3. Post #323
    The Silent Rater
    Timenova's Avatar
    November 2009
    3,266 Posts
    Hi again, Divran!
    Sorry to ask for another E2 (well, two actually. :T).
    The first one is more of a question/request.

    When I was making a Vtol, I got it all stable, and its hovering, but it keeps drifting..like it has no air resistance. I tried Hoverballs, but then it was harder to make it go...well..vertical. So, in short, what I'm asking for is an E2 that will provide Air Resistance, like a Hoverball's.

    My second request is a bit hard to explain, so you don't have to do it if you want. I'm thinking it would require applyTorque, but I may be wrong.
    Did you ever see one of those Vtols with two "wheels" on the side? It would look something like this from an overhead view. O-T-O ,where T is the body, and the two circles on each side are "wheels" which rotate on an axis, providing thrust in different angles. So, what I'm trying to ask is prehaps an E2 that will rotate the two axis'd 'wheels' a little bit forwards or backwards, but not all the way. Eg: No more then a 90 degree angle back and forth. Thank-you! :D

    (Sorry it's really long. x_x')

    You mean a V-22 Osprey? I'm trying to make one of them as well, but its trickier than I imagined. I need it to actually get into the air without flopping straight down...

    For an E2, would it be possible to make some kind of security scanner that recognises only the people who have been chosen for clearance, and rejects the others? I need this for security doors in my fortress. :) Thanks a lot. Basically I would like it so that it 'scans' people within range and either opens the door if they are registered to come in, or to activate a turret that shoots them. I know this sounds laughably simple, but I am no good at wiremod and I suppose an E2 would make it simpler to set up...again, if you can do this, thanks. :)

  4. Post #324

    February 2010
    5 Posts
    hi i know this doesent have eneything to do with what ur talking about but my steam profile was hijacked (hacked) by one of my steam friends so i wonder if eney one know eney steam hacker program to pay back???
    Reply With Quote Edit / Delete Reply Denmark Show Events Dumb x 5Funny x 2Bad Spelling x 1Bad Reading x 1Artistic x 1 (list)

  5. Post #325
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Cyber, stop spamming the forums. Your going to end up getting banned.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 1 (list)

  6. Post #326
    TO SOME- THING
    Steven :D's Avatar
    September 2009
    3,999 Posts
    Five posts is not really spam but there are no legit programs to hack accounts. And besides, you probably did something retarded and allowed him onto your account so that's your own damn fault
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 3 (list)

  7. Post #327
    Niyo's Avatar
    January 2010
    12 Posts
    Code:
    E:applyForce(-E:vel()*E:mass()*Multiplier)


    You could use either applyTorque or applyAngForce for this. You could take a look at this:
    http://www.wiremod.com/forum/contrap...tml#post136209
    and
    http://www.wiremod.com/forum/contrap...tml#post150097

    Edited:



    No, not really
    Thank you SO much :o
    I support this E2 thread.

  8. Post #328
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    I often use something like
    E:applyForce( ( (Target - Current)*20 - E:vel()):setX(0):setY(0))*E:mass())
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Informative Informative x 1 (list)

  9. Post #329
    slashsnemesis's Avatar
    July 2009
    5,440 Posts
    I need help figuring out how to make something stop after I release the w or s keys. And also go backwards when I press the S key.

    Code:
    @name Helper Bot
    @inputs Active W S
    @outputs Gyro:angle V:vector
    @persist 
    @trigger all
    
    
    Me = owner()
    Ent = entity()
    
    if (Active == 1)
    {
        runOnTick(1)
        P = Ent:elevation(Me:aimPos())
        Y = Ent:bearing(Me:aimPos())
        R = Ent:angles():roll()
        Gyro = -ang(P,Y,R)*500
        
        Ent:applyAngForce(Gyro + $Gyro*5)
        
        V = (Me:aimPos() - Ent:pos())/10
        
        if (W == 1)
        {
            Ent:applyForce(V + $V*5)
        }
        
        
    }
    (Also, any help optimizing would be great:toot:)

  10. Post #330
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Slash, i'd suggest using a different, more controlled applyForce formula.
    E:applyForce(( (TargetPos - E:pos())*20 - E:vel())*E:mass())

  11. Post #331
    Gold Member
    ryan1271's Avatar
    February 2008
    1,130 Posts
    Ok, I have a request. To me it seems pretty difficult and time consuming but here goes.

    You spawn the E2 at a spot. This is a sensor. When created, it projects a green hologram above a black PHX plate that can be placed any where. This is possibly another E2. The sensor detects NPCs within 200 units (subject to change, possibly changeable by chat command). When the NPC is in range the corresponding hologram turns red. When the NPC is out of range again it turns back to green.

    I have the NPC detecting part done.
    Code:
    @name NPC Detect
    @persist Dist Npc:entity Loc:vector
    
    interval(10)
    
    EE = entity()
    
    findByClass("npc_*")
    Loc = findClosest(EE:pos()):pos()
    
    Dist = EE:pos():distance(Loc)
    
    if (Dist < 200){
        EE:setColor(255, 0, 0) }
    if (Dist > 200){
        EE:setColor(0, 255, 0) }

  12. Post #332
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Ok, I have a request. To me it seems pretty difficult and time consuming but here goes.

    You spawn the E2 at a spot. This is a sensor. When created, it projects a green hologram above a black PHX plate that can be placed any where. This is possibly another E2. The sensor detects NPCs within 200 units (subject to change, possibly changeable by chat command). When the NPC is in range the corresponding hologram turns red. When the NPC is out of range again it turns back to green.
    *stuff*
    Wire "Prop" directly to an entity or to an entity marker.
    Code:
    @name Sensor
    @inputs Prop:entity
    if (~Prop) {
        holoCreate(1)
        holoMaterial(1,"models/shiny")
        holoParent(1,Prop)
    
        #Fancy calculations: (if this work it SHOULD place the hologram 25 units ABOVE the prop no matter the size of the prop)
        holoPos(1,Prop:toWorld(Prop:boxCenter()+vec(0,0,Prop:boxSize():z()/2+25))
    
        runOnTick(1)
    }
    
    if (findCanQuery()) { #Are we allowed to find stuff?
        findByClass("npc_*") #Find NPCs
        E = findClosest(Prop:pos()) #Find closest
        if (E:pos():distance(Prop:pos()) < 200) { #Check distance
            holoColor(1,vec(255,0,0)) #Red
        } else {
            holoColor(1,vec(0,255,0)) #Green
        }
    }
    NOTE: Untested.

  13. Post #333
    I DRAW SEALS
    xxfalconxx's Avatar
    March 2009
    6,089 Posts
    hey divran, quick question. how would i get a hologram spinning without stopping? (using trig just makes it wind and unwind. it's really annoying when you're trying to make a hypnosis beam.)

  14. Post #334
    The Silent Rater
    Timenova's Avatar
    November 2009
    3,266 Posts
    hey divran, quick question. how would i get a hologram spinning without stopping? (using trig just makes it wind and unwind. it's really annoying when you're trying to make a hypnosis beam.)
    If you are not prepared to use E2, I would suggest a toggled motor/thrusters, it makes my holograms work. I don't think you are making the same type as me though, but...:)

  15. Post #335
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    hey divran, quick question. how would i get a hologram spinning without stopping? (using trig just makes it wind and unwind. it's really annoying when you're trying to make a hypnosis beam.)
    curtime() returns the time, and since angles can go over 360 and reset back to 0, curtime() on an angle will make it spin. Multiply it for speed.

  16. Post #336

    February 2010
    25 Posts
    Could you make a e2 holo map or gpu map (or anything with a screen etc) over rp_downtown_v2.
    and make it show players location
    i got another one for you.


    im working on a security system and it would be cool with a cam that pans to the left and right like a real cam, and if possible add a ranger to it(or something else if that dont work) so the camera stops for 5 secs , sound an alarm and then goes back to pan. i want it to pan almost 180 degrees. not sure yet :P

  17. Post #337
    Oppy's Avatar
    May 2009
    1,261 Posts
    Can you make an Expression that moves the entity it is welded to with WASD?

    Preferably commented, I'm trying to learn how to use applyForce().

  18. Post #338
    Decoy Ocelot's Avatar
    March 2009
    307 Posts
    hey divran, quick question. how would i get a hologram spinning without stopping? (using trig just makes it wind and unwind. it's really annoying when you're trying to make a hypnosis beam.)

    Code:
    Angle = ang()
    
    holoAng(Index,Angle)
    
    Angle:yaw() += 1
    
    if(Angle:yaw() > 180)
    {
        Angle:yaw() = -180
    }
    More pseudo-code than functional-code, but that should give you a good start for one method of rotating a hologram.

  19. Post #339
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Hey, can someone make me an Expression which makes the chip hover in the air and stay at whatever altitude you put it at? (basically disabled gravity) :D

  20. Post #340
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Hey, can someone make me an Expression which makes the chip hover in the air and stay at whatever altitude you put it at? (basically disabled gravity) :D
    Code:
    runOnTick(1)
    entity():applyForce(vec(0,0,9.013)*entity():mass())

  21. Post #341
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Ok, I'll give that a go. I tried it before with applyForce but i couldn't ever find the right value for the Z vector.

    Thanks :buddy:

  22. Post #342
    Gold Member
    zebrak's Avatar
    October 2007
    264 Posts
    A expression2 ghillie suit please.
    I Agree A E2 Ghillie Suit would be nice to see. If anyone could make one that would be nice. :love:

  23. Post #343
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    I Agree A E2 Ghillie Suit would be nice to see. If anyone could make one that would be nice. :love:
    Not possible unless you can find a material which looks like that. The holo max limit is 50 unless you're admin and change it, and 50 holograms is not enough to make all those leaf-like things.

    Plus it would take a long time to get all the positions on the player's body right.

    So as I said you'd need a material for it, so that you can use fewer holograms. One on the back, one for each leg and so on.

  24. Post #344

    January 2010
    12 Posts
    Your holo_radar

    Could you moditfy it?
    Is it possible to combind it with darkrp?
    If so:
    cops name are in darkblue, so. Possible to display cops as blue dots on the map? President as a red dot etc?

  25. Post #345
    Gold Member
    zebrak's Avatar
    October 2007
    264 Posts
    could it be one of the materials of the bushes and plants

  26. Post #346
    JasonG5's Avatar
    December 2009
    32 Posts
    I was thinking, and kind of have the same question as RQ but different ..
    Can you do it so the "owner" of the Holo_radar is coloured something different to the other players, and perhaps for DRP make it show Money printers/entities, and if a person is wanted he will be flashing red, it might be hard so you can perhaps just do the simplest you can, either way take your time :D

  27. Post #347
    Decoy Ocelot's Avatar
    March 2009
    307 Posts
    I was thinking, and kind of have the same question as RQ but different ..
    Can you do it so the "owner" of the Holo_radar is coloured something different to the other players, and perhaps for DRP make it show Money printers/entities, and if a person is wanted he will be flashing red, it might be hard so you can perhaps just do the simplest you can, either way take your time :D
    In the section that creates the holos:

    Code:
    for(Index=1, Players:count())
    {
        holocreate(Index)
    }
    add a check for the owner and anybody else you'd like to display differently:

    Code:
    for(Index=1, Players:count())
    {
        holocreate(Index)
        if(Players[Index,entity]:SteamID() == "STEAM_targetsteamID")
        {
            #Change holo's color for a particular SteamID
            #You could also modify material, alpha, scale, etc.
    
            holoColor(Index, vec(Red,Green,Blue)
        }
    
        if(Players[Index,entity] == entity():owner())
        {
            #same as above but for the owner's hologram
            holoColor(Index, vec(Red,Green,Blue)
        }
    }

  28. Post #348
    Lambda 77 :D's Avatar
    December 2009
    462 Posts
    I'd like a E2 that allows you to enter a player into a array by typing "!add SteamID " (or name if you can't do that), then make something happen if a entity input is one of the entries in the array.

  29. Post #349
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    I'd like a E2 that allows you to enter a player into a array by typing "!add SteamID " (or name if you can't do that), then make something happen if a entity input is one of the entries in the array.
    I do that with player names.
    Store it into a table with a number value of 1. If you want to disallow, just set to 0.
    I know your here for code, but if you know about E2, use the information above and give it a go.

  30. Post #350
    JasonG5's Avatar
    December 2009
    32 Posts
    In the section that creates the holos:

    Code:
    for(Index=1, Players:count())
    {
        holocreate(Index)
    }
    add a check for the owner and anybody else you'd like to display differently:

    Code:
    for(Index=1, Players:count())
    {
        holocreate(Index)
        if(Players[Index,entity]:SteamID() == "STEAM_targetsteamID")
        {
            #Change holo's color for a particular SteamID
            #You could also modify material, alpha, scale, etc.
    
            holoColor(Index, vec(Red,Green,Blue)
        }
    
        if(Players[Index,entity] == entity():owner())
        {
            #same as above but for the owner's hologram
            holoColor(Index, vec(Red,Green,Blue)
        }
    }



    Im pretty much new to E2, so could you put that code with the holo_radar code into a working one, since i tried and failed :/

  31. Post #351
    Decoy Ocelot's Avatar
    March 2009
    307 Posts
    Replace STEAM_XXXXXXX with someone's SteamID. You can get a list of all the players' ID's by typing "status" in console. Replace Red,Green,and Blue with the color values of your choice, where 0,0,0 is black, 255,255,255 is white, 255,0,0 is red, etc etc.

    Also, this particular chip only runs a find on its first execution. If players join or leave the game, you'll need to either re-place or re-upload the e2 chip for it to properly update its player list.

    Code:
    @name Hologram Radar
    @persist Players:array Scale
    
    
    if(first())
    {
        #find all players
        findByClass("player")
        Players = findToArray()
        
        #spawn holograms for each player
        for(Index=1,Players:count())
        {
            holoCreate(Index)
            holoModel(Index,"hqicosphere")
            holoScale(Index,vec(0.5,0.5,0.5))
            holoMaterial(Index,"models/debug/debugwhite")
            
            #check for custom colors
    
            #owner
            if(Players[Index,entity]:steamID() == owner():steamID())
            {holoColor(Index,vec(Red,Green,Blue))}
            
            #player name
            if(Players[Index,entity]:steamID() == "STEAM_XXXXXXXXX")
            {holoColor(Index,vec(Red,Green,Blue))}
            
        }
        
        #black background
        holoCreate(0)
        holoModel(0,"plane")
        holoScale(0,vec(40,40,1))
        holoColor(0,vec())
        holoAlpha(0,100)
        holoMaterial(0,"models/debug/debugwhite")
        
        runOnTick(1)
    }
    
    #move holograms
    holoPos(0,entity():pos() + vec(0,0,5))
    
    for(Index=1,Players:count())
    {
        holoPos(Index,entity():pos() + entity():toLocal(Players[Index,entity]:pos()) / vec(60,60,20) + vec(0,0,10))
    }
    It's pretty easy to add more players to your list; just copy/paste these two lines:

    Code:
     
    #player name
    if(Players[Index,entity]:steamID() == "STEAM_XXXXXXXXX")
    {holoColor(Index,vec(Red,Green,Blue))}
    Make sure you place it inside the
    Code:
    if(first())
    block, though; you only need to set each holos' color once, rather than every tick.

  32. Post #352
    Finlander's Avatar
    June 2009
    51 Posts
    Hey, I have a request for an E2.

    However, it's not an actual code: It's an addition to another code. To be exact, this code:

    applyAngForce: (Easy)
    Code:
    @name applyAngForce Turret
    @inputs On [Turret Chair]:entity
    @persist Ang:angle
    @trigger
    runOnTick(On)
    if (On) {
        Pos = Chair:driver():aimPos()
        Ang = -ang(Turret:elevation(Pos),Turret:bearing(Pos),Turret:angles():roll()) * 1000 #You will have to change 1000 for different props.
        Turret:applyAngForce(Ang+$Ang*5)
    }
    This code is the mouse-aimed turret for a request that you fulfilled in page 2. There's an addition I would like to make, but I can't, since I can't the wiring.

    Basically, give it some code that makes the thing completely ignore some props. That is to say, if I look at a prop, the turret doesn't look at the prop, but instead acts as if the prop wasn't there at all. So if I, for example, look at a PHX plate that it's supposed to ignore, and there's another prop behind it, the turret looks at the prop behind the PHX plate.

    If that doesn't work out, make the turret ignore ALL of my props.

    If THAT doesn't work out, OH SHIT!!!!

  33. Post #353
    JasonG5's Avatar
    December 2009
    32 Posts
    Replace STEAM_XXXXXXX with someone's SteamID. You can get a list of all the players' ID's by typing "status" in console. Replace Red,Green,and Blue with the color values of your choice, where 0,0,0 is black, 255,255,255 is white, 255,0,0 is red, etc etc.

    Also, this particular chip only runs a find on its first execution. If players join or leave the game, you'll need to either re-place or re-upload the e2 chip for it to properly update its player list.

    Code:
    @name Hologram Radar
    @persist Players:array Scale
    
    
    if(first())
    {
        #find all players
        findByClass("player")
        Players = findToArray()
        
        #spawn holograms for each player
        for(Index=1,Players:count())
        {
            holoCreate(Index)
            holoModel(Index,"hqicosphere")
            holoScale(Index,vec(0.5,0.5,0.5))
            holoMaterial(Index,"models/debug/debugwhite")
            
            #check for custom colors
    
            #owner
            if(Players[Index,entity]:steamID() == owner():steamID())
            {holoColor(Index,vec(Red,Green,Blue))}
            
            #player name
            if(Players[Index,entity]:steamID() == "STEAM_XXXXXXXXX")
            {holoColor(Index,vec(Red,Green,Blue))}
            
        }
        
        #black background
        holoCreate(0)
        holoModel(0,"plane")
        holoScale(0,vec(40,40,1))
        holoColor(0,vec())
        holoAlpha(0,100)
        holoMaterial(0,"models/debug/debugwhite")
        
        runOnTick(1)
    }
    
    #move holograms
    holoPos(0,entity():pos() + vec(0,0,5))
    
    for(Index=1,Players:count())
    {
        holoPos(Index,entity():pos() + entity():toLocal(Players[Index,entity]:pos()) / vec(60,60,20) + vec(0,0,10))
    }
    It's pretty easy to add more players to your list; just copy/paste these two lines:

    Code:
     
    #player name
    if(Players[Index,entity]:steamID() == "STEAM_XXXXXXXXX")
    {holoColor(Index,vec(Red,Green,Blue))}
    Make sure you place it inside the
    Code:
    if(first())
    block, though; you only need to set each holos' color once, rather than every tick.


    Woow ! Thanks a lot :"D

    Now can this be combined with RP ? So Gundealers are orange, president = red, Or perhaps provide me with one line of code that I can copy and paste and edit to fit our Server's custom jobs :D


    _____
    Edit
    ____

    Sorry another thing

    the line


    holoModel(Index,"models/Humans/Group01/male07.mdl")


    How come it turns square ? Cant i make the holo's a player model, or a prop model ? instead of just a sphere :/

  34. Post #354
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Sorry another thing

    the line


    holoModel(Index,"models/Humans/Group01/male07.mdl")


    How come it turns square ? Cant i make the holo's a player model, or a prop model ? instead of just a sphere :/
    You need the custom E2 function called "holoModelAny" for that.

    But rumor has it that holoModel will soon be able to use any model... it's just that work on that is going very slowly. :S

  35. Post #355

    December 2009
    15 Posts
    hey divran can u make me a "predator" e2 where it holocreats a plane with a camera that i can adjust and then i can wire it up to a chair and a screen

  36. Post #356
    draw me like one of your french grills
    Dr.Fragg's Avatar
    July 2008
    3,618 Posts
    Is it possible for you to create an E2 or LUA script that can do the same lines along status, that lists their Steam Friends names, and their names if they were on an RP server and had set RP names?

  37. Post #357
    Gold Member
    zebrak's Avatar
    October 2007
    264 Posts
    hey divran can u make me a "predator" e2 where it holocreats a plane with a camera that i can adjust and then i can wire it up to a chair and a screen
    Now that would be cool to see :snoop:

  38. Post #358
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Hey, is it possible to make an expression code which finds the world coordinates of all cameras owned by the entity i give it?

  39. Post #359
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Hey, is it possible to make an expression code which finds the world coordinates of all cameras owned by the entity i give it?
    Yes, yes it is.
    If I knew the camera entity I would code it.

    Edited:

    Code:
    @inputs E:entity
    @persist Array:array
    interval(10000) #search every 10 seconds
    findIncludePlayerProps(E) #only this players props
    findByClass("") #camera entity here
    Array = findToArray() #put it into an array
    
    for (X = 1,Array:count()) {
    	holoCreate(X) #create a hologram
    	holoPos(X,Array[X,entity]:pos()) #position a hologram
    	holoParent(X,Array[X,entity]) #parent it to the camera
    	print("Camera "+X+" is at vector " + Array[X,entity]:pos():toString()) #print it - don't run on small intervals
    	concmd("echo Camera "+X+" is at vector " + Array[X,entity]:pos():toString()) #put it into console
    }
    Next page ->

  40. Post #360
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Yes, yes it is.
    If I knew the camera entity I would code it.
    Oh ok, cool. Does anybody know what the camera entity is? :buddy:

    Edited:

    Thanks for that code! So how will i find out the camera entity? :(