• Divran's E2 Thread
    971 replies, posted
  • Avatar of whosdr
  • [code] E = entity():isWeldedTo() print(E:type()) [/code] Paste on a camera.
  • Avatar of Quidsy the Squi
  • 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...
  • Avatar of Quidsy the Squi
  • 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
  • Avatar of Quidsy the Squi
  • 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
  • Avatar of whosdr
  • 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.
  • Avatar of Quidsy the Squi
  • Right ok, thanks. [editline]10:15PM[/editline] 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... [editline]10:19PM[/editline] By the way, i've added you on steam. [editline]10:35PM[/editline] Ok, it's gone really fucked up and now its not finding any cameras :( I'll check up with you tomorrow.
  • Avatar of Divran
  • [QUOTE=jrod;20468568]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[/QUOTE] Too much work, sorry. [editline]11:43PM[/editline] [QUOTE=Northy66;20492040]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?[/QUOTE] What?
  • Avatar of Bbls
  • [QUOTE=Divran;20464251]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[/QUOTE] Here is the link [url]http://www.wiremod.com/forum/e2-development/12811-e2-hologram-model-extension-9.html[/url]
  • Avatar of Dr.Fragg
  • [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.
  • Avatar of JasonG5
  • 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
  • Avatar of Divran
  • [QUOTE=JasonG5;20561567]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[/QUOTE] [url]http://www.facepunch.com/showpost.php?p=20464251&postcount=354[/url]
  • Avatar of Quidsy the Squi
  • [QUOTE=Divran;20343387][code]runOnTick(1) entity():applyForce(vec(0,0,9.013)*entity():mass())[/code][/QUOTE] 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
  • Avatar of whosdr
  • runOnTick(1) entity():applyForce( (vec(0,0,9.013)-entity():vel()) *entity():mass())
  • Avatar of Quidsy the Squi
  • Thanks, whosdr :3 I'll try that out now... [editline]08:04PM[/editline] Excellent, that works really well. Thanks. I highly appreciate this thread :D
  • Avatar of Divran
  • [QUOTE=Quidsy the Squidsy;20613825]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[/QUOTE] Try [code]if (entity:vel():z() < 0) { #apply upward gravity countering force here }[/code]
  • Avatar of Lambda 77 :D
  • 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".
  • Avatar of whosdr
  • if (I & ~I) {O = !O} Should work, even with runOnTick(1), unless it isn't an input.
  • Avatar of Divran
  • [QUOTE=mil0001;20651103]Can you make a code so that you can press buttons while in a vehicle?[/QUOTE] Already possible. Just wire the buttons input of the adv pod controller to something.
  • Avatar of Decoy Ocelot
  • Out of curiousity, would it be worth learning imaginary numbers and quaternions, or is applyAngForce good enough?
  • Avatar of Divran
  • [QUOTE=Decoy Ocelot;20677981]Out of curiousity, would it be worth learning imaginary numbers and quaternions, or is applyAngForce good enough?[/QUOTE] It's worth it.
  • Avatar of Fred1608
  • 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...
  • Avatar of Divran
  • [QUOTE=Fred1608;20709613]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...[/QUOTE] 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.
  • Avatar of Fred1608
  • 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()[/code]