• Post Your Current WIP V.3!: Tutorials, Tools and Model Packs Galore (GM13 googogogo)
    5,225 replies, posted
  • Avatar of Unslinga
  • [QUOTE=MrWhite;35514309]I mentioned in the first sentence why your code isn't appropriate. If someone wants a purely hologram steering wheel, then by all means they should completely ignore my code. [editline]10th April 2012[/editline] Besides, mine does 13ops or so in it's horrid unoptimized form.[/QUOTE] Yeah, and that's why your's awesome. Mine does around 200... not sure. I made mine this way so that I can place it in almost any car without needing much tweaking... although the ops on isn't optimized,
  • Avatar of Cinnamon
  • I can't tell if you're being sarcastic or not because I get legitimate messages on Youtube from crazy kids thinking I'm some sort of god or something. Idk. You're quite a bit better than me at quite a bit of stuff. I'm just moderately good at one thing, and even now I'm being surpassed like mad as people learn new things and I don't. Anyways, I just happen to know that a few people around here (Karbine, to name one) likes to use the Steering Wheel Pack, so i felt that this might come in handy or something. Hey, btw, when are you finishing that VW Beetle you started a while back? I loved that project.
  • Avatar of Unslinga
  • [QUOTE=MrWhite;35516183]I can't tell if you're being sarcastic or not because I get legitimate messages on Youtube from crazy kids thinking I'm some sort of god or something. Idk. You're quite a bit better than me at quite a bit of stuff. I'm just moderately good at one thing, and even now I'm being surpassed like mad as people learn new things and I don't. Anyways, I just happen to know that a few people around here (Karbine, to name one) likes to use the Steering Wheel Pack, so i felt that this might come in handy or something. Hey, btw, when are you finishing that VW Beetle you started a while back? I loved that project.[/QUOTE] Sorry, didn't mean to sound sarcastic. I love all your work. I really like the steeringwheel pack myself, but it doesn't really give much freedom, that's whyI've switched to holos. I really wish I could finish that beetle also but unfortunately the server I wrote it on is gone forever, and my computer crashed about a month ago, and unfortunately all my gmod work was gone. I've started from scratch. I will maybe take another go at the beetle, but I feel the need to make a propper engine script first as the one I have now is rather limited. Edit: There's no way I'm better than you... I'm madly in love with your engines and I can't ever seem to get mine right. Some content: [img_thumb]http://dl.dropbox.com/u/9062018/Screenshots/gm_multitrax0000.jpg[/img_thumb] [img_thumb]http://dl.dropbox.com/u/9062018/Screenshots/gm_multitrax0001.jpg[/img_thumb] [img_thumb]http://dl.dropbox.com/u/9062018/Screenshots/gm_multitrax0002.jpg[/img_thumb] [img_thumb]http://dl.dropbox.com/u/9062018/Screenshots/gm_multitrax0003.jpg[/img_thumb] Making a Lincoln Continental... still much work to be done.
  • Avatar of RedReaper
  • [media]http://www.youtube.com/watch?v=oGae05rahUE&feature=youtu.be[/media] Since I'm too lazy and unmotivated to make full contraptions I'm just making small gizmos. I can attach this w/ or w/o roadwheels, wire & scale it, and boom, tank tracks. Pretty much anyone could use it.
  • Avatar of Call Me Kiwi
  • [code] @name chronos_steering_wheel @inputs [Seat Slave]:entity @outputs Ang:angle interval(50) Base = entity():isWeldedTo() Ang = (Base:angles()*ang(0,-4,0) - Slave:angles()*ang(0,-4,0)) if(first()){ Texture = "models/props_combine/metal_combinebridge001" Chrome = "phoenix_storms/grey_chrome" holoCreate(1,Seat:toWorld(vec(0,36,7))) holoAng(1,Base:toWorld(ang(-45,-90,0))) holoParent(1,Seat) holoColor(1,vec(0,0,0),0) holoCreate(2,holoEntity(1):toWorld(vec(0,0,0))) holoAng(2,holoEntity(1):toWorld(Ang)) holoParent(2,holoEntity(1)) holoModel(2,"hq_cylinder") holoScale(2,vec(0.4,0.4,3)) holoMaterial(2,Chrome) holoCreate(3,holoEntity(2):toWorld(vec(0,0,20))) holoAng(3,holoEntity(2):toWorld(ang(5,0,0))) holoParent(3,holoEntity(2)) holoModel(3,"hq_torus_thin") holoScale(3,vec(2,2,2)) holoMaterial(3,Texture) holoCreate(4,holoEntity(2):toWorld(vec(-2,5,19))) holoAng(4,holoEntity(2):toWorld(ang(0,5,-80))) holoParent(4,holoEntity(2)) holoModel(4,"hq_cylinder") holoScale(4,vec(0.1,0.05,1)) holoMaterial(4,Chrome) holoCreate(5,holoEntity(2):toWorld(vec(-2,-5,19))) holoAng(5,holoEntity(2):toWorld(ang(0,-5,80))) holoParent(5,holoEntity(2)) holoModel(5,"hq_cylinder") holoScale(5,vec(0.1,0.05,1)) holoMaterial(5,Chrome) holoCreate(6,holoEntity(2):toWorld(vec(-6,0,19.5))) holoAng(6,holoEntity(2):toWorld(ang(105,0,0))) holoParent(6,holoEntity(2)) holoModel(6,"hq_cylinder") holoScale(6,vec(0.05,0.15,1)) holoMaterial(6,Chrome) holoCreate(7,holoEntity(2):toWorld(vec(0,0,18))) holoAng(7,holoEntity(2):toWorld(ang(0,0,0))) holoParent(7,holoEntity(2)) holoModel(7,"hq_sphere") holoScale(7,vec(0.6,0.6,0.2)) holoMaterial(7,Chrome) } holoAng(1,Base:toWorld(ang(-45,-90,0))) holoAng(2,holoEntity(1):toWorld(Ang)) holoAng(3,holoEntity(2):toWorld(ang(5,0,0))) holoAng(4,holoEntity(2):toWorld(ang(0,5,-80))) holoAng(5,holoEntity(2):toWorld(ang(0,-5,80))) holoAng(6,holoEntity(2):toWorld(ang(105,0,0))) holoAng(7,holoEntity(2):toWorld(ang(0,0,0))) [/code] Perhaps that will cut down ops to 60 or so, and it should work fine, as all I did was copy/paste the essential bit. From what I can tell at any rate.... Anyways, you NEVER want to create holos outside an "if(first())){}" or similar statement. As it will cost ops and the server having to spawn 7 holograms each tick, along with scale them parent them etc.
  • Avatar of RedReaper
  • does that even really need to run every tick? Like an interval of 50 should be plenty for it, that'd have it update at ~20fps and drop the ops considerably. If(first()) should include the Base = entity():isWeldedTo(), etc...I'm sure we can optimize to run under 10 ops.
  • Avatar of Unslinga
  • [QUOTE=Call Me Kiwi;35519369] Perhaps that will cut down ops to 60 or so, and it should work fine, as all I did was copy/paste the essential bit. From what I can tell at any rate.... Anyways, you NEVER want to create holos outside an "if(first())){}" or similar statement. As it will cost ops and the server having to spawn 7 holograms each tick, along with scale them parent them etc.[/QUOTE] Thank you kindly sir.
  • Avatar of Call Me Kiwi
  • [QUOTE=Unslinga;35519471]Thank you kindly sir.[/QUOTE] You're welcome. I guess I might as well put this here to see what people think of it. [IMG]http://dl.dropbox.com/u/45561413/Gmod/2012-03-17_00001.jpg[/IMG] While the image is a few weeks old it should be noted it is only 6 props...
  • Avatar of Cinnamon
  • my wheel code runs at an interval of 100 without any problems whatsoever. I've been working on a rewrite that includes optional movement smoothing, Angle adjustment, a crude form of predictive (not really) motion adjustment, and a bit of proper code writing and optimization. I'm predicting <20ops with any luck, though I'm willing to let it get to 40 before I cut down on features.
  • Avatar of neolite
  • [QUOTE=MrWhite;35504956]I've noticed that people are still using props for steering wheels, or are using straight default holograms to do it. I can't stand this, so I wrote a bit of code that might inspire some people. [code]@name basic E2 Steering Wheel @inputs Steering:entity @persist Model:string Ratio Angle interval(100) Model="models/steeringwheels/truckwheel.mdl" Ratio=5 if(first()){ holoCreate(1) holoModel(1,Model) holoPos(1,entity():toWorld(vec(0,0,10))) holoParent(1,entity()) } holoAng(1,entity():toWorld(ang(A,90,0))) Angle=entity():isWeldedTo():angles():yaw()-Steering:angles():yaw()[/code] I know it's dirty. Sue me. The ratio value controls the angle amplification between the steering wheel and the steering master. Unless you use the wheels from the Steering Wheel Pack and a PHX bar for the steering master, you'll probably have to play with the angles a bit. I don't know a whole lot about controlling hologram angles properly, so I couldn't quite figure out how to get the wheel at the proper angle, so users will have to set the angle manually by placing the E2. I wanted to have a steering wheel angle and depth adjuster, which would have been cool, but I just don't know enough yet. Enjoy.[/QUOTE] [code]@name basic E2 Steering Wheel @inputs Steering:entity @persist Model:string Ratio Angle interval(20) Model="models/steeringwheels/truckwheel.mdl" Ratio=5 if(first()){ holoCreate(1) holoModel(1,Model) holoPos(1,entity():toWorld(vec(0,0,10))) holoParent(1,entity()) } holoAng(1,entity():toWorld(ang(90,Angle,0))) Angle=entity():isWeldedTo():angles():yaw()+Steering:angles():yaw() [/code] I fixed it, still no model shows. It's just a holocube, tried changing models, no effect. The code you wrote was kinda wrong, sure it was following the slave, but it was TILTING left and right(If you look to north) instead of just yawing(turning) if you know what i mean. Now i edited it so it turns to the slave correctly, so you can just place the chip on the dashboard.
  • Avatar of Flyingtaco
  • Kiwi has obviously never heard of holoParent. Additionally, you can persist Base and set it in the first statement.
  • Avatar of neolite
  • Meh beybe haz dun a new paint job! [img]http://i1077.photobucket.com/albums/w479/neolite112/gm_drivingmap_mk1-95_beta0066.jpg[/img] [img]http://i1077.photobucket.com/albums/w479/neolite112/gm_drivingmap_mk1-95_beta0067.jpg[/img] [img]http://i1077.photobucket.com/albums/w479/neolite112/gm_drivingmap_mk1-95_beta0068.jpg[/img] rate plox
  • Avatar of Cinnamon
  • [QUOTE=neolite;35526790][code]@name basic E2 Steering Wheel @inputs Steering:entity @persist Model:string Ratio Angle interval(20) Model="models/steeringwheels/truckwheel.mdl" Ratio=5 if(first()){ holoCreate(1) holoModel(1,Model) holoPos(1,entity():toWorld(vec(0,0,10))) holoParent(1,entity()) } holoAng(1,entity():toWorld(ang(90,Angle,0))) Angle=entity():isWeldedTo():angles():yaw()+Steering:angles():yaw() [/code] I fixed it, still no model shows. It's just a holocube, tried changing models, no effect. The code you wrote was kinda wrong, sure it was following the slave, but it was TILTING left and right(If you look to north) instead of just yawing(turning) if you know what i mean. Now i edited it so it turns to the slave correctly, so you can just place the chip on the dashboard.[/QUOTE] [code] @name basic E2 Steering Wheel @inputs Steering:entity @persist Model:string Ratio Angle interval(100) Model="models/steeringwheels/lambowheel.mdl" Ratio=1 if(first()){ holoCreate(1) holoModel(1,Model) holoPos(1,entity():toWorld(vec(0,0,10))) holoParent(1,entity()) } holoAng(1,entity():toWorld(ang(Angle*Ratio,90,0))) Angle=entity():isWeldedTo():angles():yaw()+Steering:angles():yaw() [/code] I had no problems with this code here. I get no tilting effect you describe. To get the model to show, you need to have the Steering Wheel Model Pack, Wiremod Extras, and the concmd "wire_holograms_modelany" activated. Your changes ended up increasing the opcount to the low 50s, as opposed to mid 10s. Not really a"fix".
  • Avatar of neolite
  • Yea no, just realized I did no "fix" at all, sorry. I have all those stuffs except that command activated. Might wanna tell people to activate that command when releasing the code, since noone has it activated as default (atleast I didn't). I had no clue, I might just be retarded. Also, Facepunch is doing trickz with your minds. Can't trust it anymore! [img]http://i1077.photobucket.com/albums/w479/neolite112/lol.jpg[/img] Edit: I didn't get your edit, but it came up when i pressed reply. Wasn't that funny anymore.
  • Avatar of Cinnamon
  • yeah, I ended up editing the post about 4 times in 1 and a half minutes, so FP might have gotten confused. When I first posted the code, I forgot that it needed a command. Anyways, I just wanted a nice little 1 hologram steering wheel E2 that worked properly and was simple to use. i found it simple to use and effective, so I figured I might as well let everyone else have it. Damn, I'm rereading all my posts and I sound like an arrogant douchebag reading them to myself.
  • Avatar of RedReaper
  • [img]http://img152.imageshack.us/img152/3254/neolitefinal.jpg[/img] [QUOTE=MrWhite;35531725]Damn, I'm rereading all my posts and I sound like an arrogant douchebag reading them to myself.[/QUOTE] I hate when that happens to me.
  • Avatar of neolite
  • [QUOTE=RedReaper;35531969][img]http://img152.imageshack.us/img152/3254/neolitefinal.jpg[/img] I hate when that happens to me.[/QUOTE] HAHAHAH the pic gave me a good laugh!
  • Avatar of RedReaper
  • thread needs more drama I've had a few people ask me how to do this. It's not hard, it gets rid of the wheel2 wobbles. [video=youtube;38RbjHe7Ybk]http://www.youtube.com/watch?v=38RbjHe7Ybk&feature=youtu.be[/video]
  • Avatar of skeligandrew
  • [QUOTE=RedReaper;35519297][media]http://www.youtube.com/watch?v=oGae05rahUE&feature=youtu.be[/media] Since I'm too lazy and unmotivated to make full contraptions I'm just making small gizmos. I can attach this w/ or w/o roadwheels, wire & scale it, and boom, tank tracks. Pretty much anyone could use it.[/QUOTE] You gonna release that? :O
  • Avatar of RedReaper
  • [QUOTE=skeligandrew;35538051]You gonna release that? :O[/QUOTE] when i get all the bugs ironed out. It still has one part not in the vid that acts weird occasionally at certain angles. Actually it's better on a normal contraption than this, this is a shitty example, I was driving around a hl2 vehicle so the physics is all weird. [editline]somewhere between then and now.[/editline] [media]http://www.youtube.com/watch?v=Cdh82q439Dw[/media] Told you so. :downs:
  • Avatar of Unslinga
  • [QUOTE=RedReaper;35535604]thread needs more drama I've had a few people ask me how to do this. It's not hard, it gets rid of the wheel2 wobbles. [video=youtube;38RbjHe7Ybk]http://www.youtube.com/watch?v=38RbjHe7Ybk&feature=youtu.be[/video][/QUOTE] This is pretty much the same as I've done for ages except that I use Precision Alignment instead because it allows me to have the absolute center of the prop instead of it being off-center.
  • Avatar of neolite
  • Alright, time for more WIP. T-truck! Not done yet, still has some work to do, but the suspension is great. The paint seems to horrible though. BAJA 2012 @ Garrysmod, yup.. bring it. [img]http://i1077.photobucket.com/albums/w479/neolite112/gm_drivingmap_mk1-95_beta0069.jpg[/img] [img]http://i1077.photobucket.com/albums/w479/neolite112/gm_drivingmap_mk1-95_beta0071.jpg[/img] This picture below was without springs. [img]http://i1077.photobucket.com/albums/w479/neolite112/gm_drivingmap_mk1-95_beta0072.jpg[/img] [img]http://i1077.photobucket.com/albums/w479/neolite112/gm_drivingmap_mk1-95_beta0074.jpg[/img]
  • Avatar of RedReaper
  • [QUOTE=Unslinga;35545006]This is pretty much the same as I've done for ages except that I use Precision Alignment instead because it allows me to have the absolute center of the prop instead of it being off-center.[/QUOTE] I don't remember how to make PA do that, use one prop's masscenter attaching to another prop. If I did I'd do that myself, though the tut was for people who don't use PA anyway. Oh well.
  • Avatar of Unslinga
  • [QUOTE=RedReaper;35551290]I don't remember how to make PA do that, use one prop's masscenter attaching to another prop. If I did I'd do that myself, though the tut was for people who don't use PA anyway. Oh well.[/QUOTE] If I have any time after next weekend I might make a tutorial on it. I already promised a lot of people to make a suspension tutorial.