1. Post #361
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Code:
    E = entity():isWeldedTo()
    print(E:type())
    Paste on a camera.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Useful Useful x 1 (list)

  2. Post #362
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Great, thanks very much for your help! I can do small things using expression 2 but i don't really understand arrays and all that stuff...

  3. Post #363
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    If I knew what you wanted to do with this data, i'd add that too.

  4. Post #364
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Nah, it's ok. My intention was to spawn holograms at the camera co-ordinates, but it seems you put that in anyway in order to find the position. :P

  5. Post #365
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Yeah, I kinda included that in the code so...

  6. Post #366
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Hi, i just went on Gmod and found the camera entity and stuff. When i spawn the expression, it works well and does what i want, apart from the fact that it only manages to find 1 camera :(

    I had 3 cameras and it kept only finding the 1 camera that i made first. Any way around this, so it finds all of them? :D

  7. Post #367
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Odd. I can't find any flaw in the code. I'm launching SP to give it a go myself.
    Add me on steam. Whosdr, as always. If I don't get it working today, at least you can ask me tomorrow.
    Btw, I don't think RT cameras use the same class as regular cameras.

    EDIT:
    I found it to work on all my cameras, but not RT cameras.
    If there is still a problem, try updating your Wiremod and playing in Single Player.

  8. Post #368
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Right ok, thanks.

    Edited:

    Ok, I've found what had happened. To test it worked, i got rid of the entity input and changed where it says 'E' to 'owner()'. For some reason that's what messed it up, because when i had the expression with owner(), it only found the first camera. With the E:entity input, it finds all of them. I have no idea why...

    Edited:

    By the way, i've added you on steam.

    Edited:

    Ok, it's gone really fucked up and now its not finding any cameras :( I'll check up with you tomorrow.

  9. Post #369
    Gold Member
    Divran's Avatar
    April 2008
    2,629 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
    Too much work, sorry.

    Edited:

    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?
    What?

  10. Post #370
    Decoy Ocelot's Avatar
    March 2009
    307 Posts
    *edit*
    nevermind, already answered

  11. Post #371
    Gold Member
    Bbls's Avatar
    February 2009
    7,213 Posts
    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
    Here is the link http://www.wiremod.com/forum/e2-deve...tension-9.html

  12. Post #372
    draw me like one of your french grills
    Dr.Fragg's Avatar
    July 2008
    3,618 Posts
    [QUOTE=Divran;20519805

    What?[/QUOTE]

    As in say Taco n Banana, If somebody has to create a character with a name. Would it be possible to create SOME form of script that could link a character with a player.

  13. Post #373
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    SteamID?

  14. Post #374
    draw me like one of your french grills
    Dr.Fragg's Avatar
    July 2008
    3,618 Posts
    Steam friends name, and character name. Not just status.

  15. Post #375
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Well, I don't know of a way.

  16. Post #376
    JasonG5's Avatar
    December 2009
    32 Posts
    Sooooo

    How am I able to show Props in E2 ..
    so like ..
    I spawn the E2, and it shows a barrel ..
    Or i can spawn an E2 which shows a ragdoll holding a spear ?(since in RP i cant spawn ragdolls so wanted to know if E2 could just make a .. hologram of one .. ) =D

  17. Post #377
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Sooooo

    How am I able to show Props in E2 ..
    so like ..
    I spawn the E2, and it shows a barrel ..
    Or i can spawn an E2 which shows a ragdoll holding a spear ?(since in RP i cant spawn ragdolls so wanted to know if E2 could just make a .. hologram of one .. ) =D
    http://www.facepunch.com/showpost.ph...&postcount=354

  18. Post #378
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Code:
    runOnTick(1)
    entity():applyForce(vec(0,0,9.013)*entity():mass())
    Hey, you gave me this code before and it works, however because it just applies upwards force against the chip, if you introduce another upwards force and then stop, it carries on floating skyward because its weight isn't enough to overcome the movement given by that force and the hovering force. If you get what i mean...

    So is it possible to make it hover at an altitude, and stay at it as long as you are not, at that moment, affecting it by some other means?

    Sorry, that was kind of a retarded description, i hope someone understands... :P

  19. Post #379
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    runOnTick(1)
    entity():applyForce( (vec(0,0,9.013)-entity():vel()) *entity():mass())

  20. Post #380
    Quidsy the Squidsy's Avatar
    February 2009
    275 Posts
    Thanks, whosdr :3 I'll try that out now...

    Edited:

    Excellent, that works really well. Thanks. I highly appreciate this thread :D

  21. Post #381
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Hey, you gave me this code before and it works, however because it just applies upwards force against the chip, if you introduce another upwards force and then stop, it carries on floating skyward because its weight isn't enough to overcome the movement given by that force and the hovering force. If you get what i mean...

    So is it possible to make it hover at an altitude, and stay at it as long as you are not, at that moment, affecting it by some other means?

    Sorry, that was kind of a retarded description, i hope someone understands... :P
    Try
    Code:
    if (entity:vel():z() < 0) {
    #apply upward gravity countering force here
    }

  22. Post #382
    Lambda 77 :D's Avatar
    December 2009
    462 Posts
    I'm making a ship, only thing wrong with it at the moment is that it uses more than one E2 chip, because one is on trigger and the other on tick.
    Is there any way of being able to merge them together? For instance, I have a toggle that works by "if I O = !O". I want to add it to the ROT E2, but because it runs on tick even when you just tap the input button it switches between !O and O really fast, even if I used "I & ~I".

  23. Post #383
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    if (I & ~I) {O = !O} Should work, even with runOnTick(1), unless it isn't an input.

  24. Post #384
    Gold Member
    mil0001's Avatar
    January 2010
    485 Posts
    Can you make a code so that you can press buttons while in a vehicle?

  25. Post #385
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Can you make a code so that you can press buttons while in a vehicle?
    Already possible. Just wire the buttons input of the adv pod controller to something.

  26. Post #386
    Decoy Ocelot's Avatar
    March 2009
    307 Posts
    Out of curiousity, would it be worth learning imaginary numbers and quaternions, or is applyAngForce good enough?

  27. Post #387
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    Out of curiousity, would it be worth learning imaginary numbers and quaternions, or is applyAngForce good enough?
    It's worth it.

  28. Post #388
    Fred1608's Avatar
    August 2009
    27 Posts
    I need something that i belive to be simple, but i don't know how to do it... Some guy is using a E2 to set fire on me, i need something to stop the fire...

  29. Post #389
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    I need something that i belive to be simple, but i don't know how to do it... Some guy is using a E2 to set fire on me, i need something to stop the fire...
    You can't ignite or unignite with E2 unless you have a custom E2 extension.
    Use a wire igniter with a time of 0.01 or something to unignite yourself.

  30. Post #390
    Fred1608's Avatar
    August 2009
    27 Posts
    Hey, one other question, im working on a E2 that give me the coordinates of a player after i tipe his name on the chat, but its not working, can you help me?

    Code:
    @name People Finder
    @inputs
    @outputs X Y Z
    @persiist Cos:Vector Player:entity Name:String
    Name = owner():lastSaid()
    Interval(10)
    Player  = Name:findPlayerByName()
    Cos = Player:pos()
    
    X = Cos:x()
    Y = Cos:y()
    Z = Cos:z()

  31. Post #391
    Dioxybenzone's Avatar
    May 2009
    330 Posts
    1. ive seen a e2 that will spawn a propane tank and fire it, and do it repeatedly, while the tanks dont collide with each other and explode prematurely. Is this possible to make?

    2. could you make a non-admin portal gun e2? ive seen ones that make a portal looking gun hologram over th gravity gun, and right and left click makes portals that u can go through. but if your an admin you can send props through. i dont have an example e2 to show u but i was just wondering if it were possible.

    Edited:

    i dont mean to sound so pathetic but i was also wondering if u can make an e2 that makes a player type something in chat, or when they enter a vehicle it thanks the creator

    Edited:

    (im just posting these for friends, i only want the propane for me)

    Edited:

    nvm about the chat one. and thanks for the portal gun link. but still wondering about the propane cannon

  32. Post #392
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Code:
    @name People Finder
    @inputs
    @outputs X Y Z
    @persiist Cos:Vector Player:entity Name:String O:entity
    if (first()) {runOnChat(1),runOnTick(1), O = owner()}
    if (chatClk(owner()) {
    Name = owner():lastSaid()
    Temp  = Name:findPlayerByName(Name)
    if (Temp) {Player = Temp}
    }
    Cos = Player:pos()
    X = Cos:x()
    Y = Cos:y()
    Z = Cos:z()

  33. Post #393
    Gold Member
    Divran's Avatar
    April 2008
    2,629 Posts
    2. could you make a non-admin portal gun e2? ive seen ones that make a portal looking gun hologram over th gravity gun, and right and left click makes portals that u can go through. but if your an admin you can send props through. i dont have an example e2 to show u but i was just wondering if it were possible.
    http://www.wiremod.com/forum/contrap...portalgun.html

  34. Post #394
    GhostReaper's Avatar
    October 2008
    212 Posts
    Is it possible to have hint or print output a value such as Target:entity?

    I tried
    Code:
    if..........{hint("Targeting Target:entity",3)}
    and well,it outputs exactly what it says. If it's not possible I'm curious to if there are a way to do something similar.

  35. Post #395
    ChronoMagus's Avatar
    August 2009
    114 Posts
    can you make me a e2 that uses a ranger to check for steam id's and opens a door when the correct steam id is checked with the ranger?

  36. Post #396
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    Is it possible to have hint or print output a value such as Target:entity?

    I tried
    Code:
    if..........{hint("Targeting Target:entity",3)}
    and well,it outputs exactly what it says. If it's not possible I'm curious to if there are a way to do something similar.
    You'd use hint("Targeting "+Target:name())

  37. Post #397
    GhostReaper's Avatar
    October 2008
    212 Posts
    You'd use hint("Targeting "+Target:name())
    Thanks for that,now it looks like this
    Code:
    @name Hint_Target
    @inputs Input1 Target:entity
    
    if (Input1==1) {hint("Targeting"+Target:name()),3}
    But now I get an error that says "No such function: hint(string) at line 4, char 17". Absolutely no idea what it's complaining about.

  38. Post #398
    Gold Member
    whosdr's Avatar
    July 2008
    3,017 Posts
    you've shifted a bracket.

    if (Input1==1) {hint("Targeting"+Target:name(),3)}
    By the way, if it is just 1 and 0, you can remove the == 1, and it returns boolean. 0 for false, anything else is true.

  39. Post #399
    GhostReaper's Avatar
    October 2008
    212 Posts
    you've shifted a bracket.

    if (Input1==1) {hint("Targeting"+Target:name(),3)}
    By the way, if it is just 1 and 0, you can remove the == 1, and it returns boolean. 0 for false, anything else is true.
    Works fine now,thanks for the help.

  40. Post #400
    Slaaf van EternalFlamez.Ik wilde heel graag de laatste Indie Bundle, en ik kreeg deze kuttitel er gratis bij.
    Staneh's Avatar
    March 2010
    4,072 Posts
    Hey Divran, I got a e2 requests, I am building like a microwave with an igniter, but I dont really know how to let the igniter ''reignite'' without pressing a button hundreds of times..