Go Back   Wiremod Forums > Wiremod Adv. Skills > Wiremod Lua Coding

Reply
 
LinkBack Thread Tools Display Modes
Old 08-03-2008   #1 (permalink)
Newbie
 
mvanbem's Avatar
 

Join Date: Aug 2008
Location: Brookings, South Dakota, USA
Posts: 1
mvanbem is on a distinguished road
Lightbulb Wire Wirer and other factory tools

I've been a Wire user for some time, and I always wanted to make more complex Wire factories. I'm a decent C/C++ programmer and I'd touched Lua once before, so yesterday I decided to attempt making some of my ideas. Most of these things would be doable with something like the STOOL Turret if it worked with Wire ... and if it didn't crash my machine every time I make wheels.

Wire Wirer
This tool lets you spawn and pair Source Wirers and Destination Wirers. When paired, an input on the Source Wirer will wire the pointed-at ents together if the src and dst port names exist.

Wire Axis Maker
This tool creates aligned Axis constraints between two props. It casts a primary beam which, if it hits a prop, casts a secondary beam in a configurable direction from the first prop's center. If the secondary beam hits a prop and the Axis Maker's wire input is triggered it will make a perfectly aligned Axis constraint.

Additions to the Prop Spawner
I added a checkbox to the Wire Prop Spawner tool that can make props spawn frozen. I guess this could have been another wire input to the Prop Spawner itself, but I didn't see much of a reason to turn it on and off. With this addition you can mount a Prop Spawner on a hydraulic, move it into place, spawn it, and move the spawner out of the way. The prop is left in the air to be constrained and wired before launch.

Wire Freezer
This tool can freeze and unfreeze whatever it's pointing at. I made this to complement the freeze option in the Prop Spawner. If you spawn it frozen you need some way to unfreeze it when you're done.

Wire Expression Maker
This tool spawns Expression gates (minimal code duplication; it mostly calls functions defined in stools/wire_gate_expression.lua). I didn't copy the Expression editor, but it borrows the same convars so you can just use the normal one.


Except for the modification to the Prop Spawner, I have all of this stuff sitting in its own "mvanbem wire pack" addon folder to keep it from polluting my SVN Wire installation. If anyone is interested I can try to get the code cleaned up for release.

I plan to add a Wire Thruster Maker and a Wire Wheel Maker, and maybe more if I have time. I would like to note that there would be less code duplication if I could make the Wire Thruster Maker (for example) part of the normal Wire Thruster tool; do you guys accept patches into the official SVN?

Finally, here's some screenshot spam. The first three show the Wire Wirer wiring a button to a display pixel. The next six show a car factory I made using the Axis Maker, freeze-enabled Prop Spawner, and Freezer. It pumps out a car every three seconds continuously. The last shot shows a wheel with the Axis Maker firing a locally-aligned beam.
Attached Images
File Type: jpg wirer1.jpg (432.2 KB, 85 views)
File Type: jpg wirer2.jpg (434.3 KB, 48 views)
File Type: jpg wirer3.jpg (435.4 KB, 50 views)
File Type: jpg factory1.jpg (476.9 KB, 39 views)
File Type: jpg factory2.jpg (499.5 KB, 55 views)
File Type: jpg factory3.jpg (505.5 KB, 40 views)
File Type: jpg factory4.jpg (472.5 KB, 35 views)
File Type: jpg controls.jpg (544.7 KB, 54 views)
File Type: jpg cars.jpg (639.8 KB, 65 views)
File Type: jpg axis_maker.jpg (535.1 KB, 39 views)
mvanbem is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 08-03-2008   #2 (permalink)
Newbie
 
Tape's Avatar
 

Join Date: May 2008
Posts: 8
Tape is on a distinguished road
Default Re: Wire Wirer and other factory tools

You sir, are epic. I'd love to try these tools out if its not much trouble
__________________
"... Why are men so noble when we women are so little worthy of them?" -Lucy Dracula Bram Stoker

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.
98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.
Tape is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-23-2008   #3 (permalink)
Member
 
Tolyzor's Avatar
 

Join Date: Aug 2008
Posts: 48
Tolyzor is on a distinguished road
Default Re: Wire Wirer and other factory tools

Wow, Iv really been wanting someone to make something like this for ages, please do make the wire thruster and wheel maker tools! This needs to be included into the official svn.
Tolyzor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-26-2008   #4 (permalink)
Member
 
willthemage's Avatar
 

Join Date: Jun 2008
Location: Cassadaga, New York
Posts: 81
willthemage is an unknown quantity at this point
Default Re: Wire Wirer and other factory tools

great tools they will be really useful. Now if we could download the tools that would it would be alot more usefull.
__________________
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.
98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.

willthemage is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-28-2008   #5 (permalink)
Newbie
 
Jeeva's Avatar
 

Join Date: Aug 2008
Location: Cambs/Notts, UK
Posts: 1
Jeeva is on a distinguished road
Default Re: Wire Wirer and other factory tools

Ha, I came on here to try and figure how to code something that would wire all same-named inputs and outputs together and... you've got it (I think.).

Nice one =)
Jeeva is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-28-2008   #6 (permalink)
Member
 
willthemage's Avatar
 

Join Date: Jun 2008
Location: Cassadaga, New York
Posts: 81
willthemage is an unknown quantity at this point
Default Re: Wire Wirer and other factory tools

for lua tutorials go to this link: Lua Tutorial Series - GMod Wiki - GarrysMod.com
__________________
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.
98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.

willthemage is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-28-2008   #7 (permalink)
Newbie
 
ufoslava's Avatar
 

Join Date: Nov 2007
Location: Israel
Posts: 18
ufoslava is on a distinguished road
Send a message via ICQ to ufoslava Send a message via MSN to ufoslava
Default Re: Wire Wirer and other factory tools

O_O Woot!

This MUST reach Wire SVN some day!
Irreplaceable tools for awesome factory! Ask for dev's help, ask other ppl or whatever, but you are soooo have to complete these tool's set!

Thumbs up for mvanbem!!
__________________
Unlike humans, machines are really loyal, and always by your side...
They wont care if you using other machine, moreover machines wont prefer anybody else to work on them...
If you take a good care of it, it will return the favour, and operate well...

Not like humans, who are cheating, killing with no reason, buying the law, getting drunk and betraying the closest...

That's how the geeks were born...
ufoslava is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-28-2008   #8 (permalink)
Member
 
mjmr89's Avatar
 

Join Date: Mar 2008
Posts: 81
mjmr89 is on a distinguished road
Default Re: Wire Wirer and other factory tools

This is pretty sweet - but I have a suggestion for an addition! Some kind of wired roper. Maybe not necessarily for a factory - I was thinking it would attach a rope from the point the beam is hitting to the actual roper thing.
mjmr89 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-28-2008   #9 (permalink)
Wire Guru

 
AzraelUK's Avatar
 

Join Date: Aug 2007
Location: Camelot, it is a silly place.
Posts: 458
AzraelUK is on a distinguished road
Send a message via MSN to AzraelUK
Default Re: Wire Wirer and other factory tools

What about the STool turret? Can't you just rig up that to have wire inputs for left click, right click, reload etc.?
__________________
Gamer, coder, builder, cynic. Website, profile.
AzraelUK is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-29-2008   #10 (permalink)
Advanced Member
 
Squeakyneb's Avatar
 

Join Date: May 2008
Posts: 146
Squeakyneb is on a distinguished road
Default Re: Wire Wirer and other factory tools

haha, this is mvanbems only post. I think he put it here and left it I want that release, but i think he's bailed
__________________

Linux is like wigwam - no windows, no gates, and an apache inside

Twatlight, parody of Twilight movie. Not mine, but frickin hilarious
Squeakyneb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -7. The time now is 04:10 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.

Page top