Go Back   Wiremod Forums > Wiremod > Wiremod General Chat

Wiremod General Chat All general wiremod discussion/chat.

Reply
 
LinkBack (2) Thread Tools Display Modes
Old 07-27-2008   #141 (permalink)
Newbie
 
blob202's Avatar
 

Join Date: Aug 2007
Posts: 20
blob202 is on a distinguished road
Default Re: WireSim- The Scriptable WireMod Simulator

Quote:
Originally Posted by IEF015 View Post
Alright. I'm done coding for a little while now. I'm starting to get a headache. XD

Small 2kb pack, which some chips need the images from the full pack I made for cpf. Which are locating in the Default images folder.

Includes:

---ARITHMETIC/MATH
Ceiling (Round Up)
Floor (Round Down)
Log (Logarithm)
Exponential (e^A)
SquareRoot (sqrt)

I'll leave the rest for everyone else, feels like I'm hogging up all the lua. :P

Hey, I already sent those to cpf :P Look at my edited post.

Also, added system gates.

System Time, System Clock, and System Date. All added to the main distro I think.
blob202 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-27-2008   #142 (permalink)
Newbie
 
blob202's Avatar
 

Join Date: Aug 2007
Posts: 20
blob202 is on a distinguished road
Default Re: WireSim- The Scriptable WireMod Simulator

I am working on a Latch RAM memory device, but am having a problem

When I create the Latch, I get spammed errors about "LUA screwing up, probably a syntax error" (that is what it says). Here is my code, let me know if I completly messed something up:

Code:
i=0;
clock=0;
in=0;
out=0;
function init()
Ent:setpic("Addons/Default/images/8store.png");
Ent:setOutputs("Out")
Ent:setInputs("Index,Clock,In")
Ent:hookThink()
end
function onThink()
if clock == 1 then
out = in;
Ent:triggerOutput("Out",out);
end
Ent:setToolTip("Memory Store\nIndex:"..i.."\nClock:"..clock.."\nIn:"..in.."\nOut:"..out);
end
function triggerInput(input, value)
if input=="Index" then
i=value;
elseif input=="Clock" then
clock=value;
elseif input=="In" then
in=value;
end
end
blob202 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #143 (permalink)
cpf
Advanced Member
 
cpf's Avatar
 

Join Date: Nov 2007
Posts: 396
cpf is on a distinguished road
Send a message via MSN to cpf Send a message via Skype™ to cpf
Default Re: WireSim- The Scriptable WireMod Simulator

You put in a ;
__________________
WireSim.com
Why does everybody say CPF? it's cpf :P
Hey, look! It's a tutorial on using LuaInterface!
cpf is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #144 (permalink)
Newbie
 
blob202's Avatar
 

Join Date: Aug 2007
Posts: 20
blob202 is on a distinguished road
Default Re: WireSim- The Scriptable WireMod Simulator

Removing them didnt do anything. And by the way, LUA allows the use of semi-colons at the end of the lines like in C++/C#.
blob202 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #145 (permalink)
<3

 
IEF015's Avatar
 

Join Date: Feb 2008
Location: London, ON (Canada, eh?)
Posts: 765
IEF015 has a spectacular aura aboutIEF015 has a spectacular aura about
Default Re: WireSim- The Scriptable WireMod Simulator

Code:
up=0
down=0
reset=0
out=0
function init()
Ent:setpic("Addons/Default/images/counter.png")
Ent:setOutputs("Out")
Ent:setInputs("Up,Down,Reset")
Ent:setInputY("12,29,45")
end
function triggerInput(input, value)
  if input=="Up" then
    up=value
  elseif input=="Down" then
    down=value
  elseif input=="Reset" then
    reset=value
  end
  if (not(up=="0")) then
    out=out+1
  end
  if (not(down=="0")) then
    out=out-1
  end
  if (not(reset=="0")) then
    out=0
  end
  Ent:triggerOutput("Out",out)
  Ent:setToolTip("Up: "..up.."\n".."Down: "..down.."\n".."Reset: "..reset.."\n".."Output: "..out)
end
Working Increment/Decrement Chip

EDIT:
Just came up with a nice feature (if possible with C#.net, which I think it is) when you have nothing else to do :P :

Ent:PlaySound(string directory)........................................ This should make the entity play a sound.
Ent:StopHookSound()............................... ......................This should make the entity stop a sound in a hook.
Ent:StopSound()................................... ........................Stop sounds in a whole entity.
Ent:StopAllSound()................................ ........................Stops all sounds currently playing in WireSim.
__________________
Signature:
WIREMOD WILL NOT WORK ON A PIRATED GMOD!


MY COLOUR IS BLUE.
Post your expressions here: www.wiredexpressions.tk
It's my favourite country song. And I hate it.
IEF015's got his own website :3

Last edited by IEF015; 07-27-2008 at 10:11 AM..
IEF015 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #146 (permalink)
cpf
Advanced Member
 
cpf's Avatar
 

Join Date: Nov 2007
Posts: 396
cpf is on a distinguished road
Send a message via MSN to cpf Send a message via Skype™ to cpf
Default Re: WireSim- The Scriptable WireMod Simulator

OK, I'll add those to my huuuge ginormous list of features-to-add (first come first served).
blob202 made some cool system gates that can start bat files, and get enviroment variables...

Also, there's a change in the next update (which isn't quite out yet) where instead of the naming for the Lua files being name(catergory).lua, it's just name.lua, and the catagory is determined by what folder the file is placed in. ex: The button chip is named Button.lua, but is put in addons/default/lua/IO/.
__________________
WireSim.com
Why does everybody say CPF? it's cpf :P
Hey, look! It's a tutorial on using LuaInterface!

Last edited by cpf; 07-27-2008 at 10:45 AM..
cpf is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #147 (permalink)
<3

 
IEF015's Avatar
 

Join Date: Feb 2008
Location: London, ON (Canada, eh?)
Posts: 765
IEF015 has a spectacular aura aboutIEF015 has a spectacular aura about
Default Re: WireSim- The Scriptable WireMod Simulator

Alright, I have put my last (for now) pack together for Main Dist.

Features everything in Pack3,4 and 5. Including Images.

And one more lua file... because I was bored... Random Gate. (tooltips, Clk, Min, Max)

Also, I have put together in the Pack/lua/Math type folder structure.

All images are set to the Default folder, so make sure the including images are in the default folder images.

And cpf, when you uploaded my first pack, you didn't upload the images that came with it, so some of the logic and comparison chips don't load up correctly.



I think I did a big share with this game.
Also cpf, I love this game. (Just because it's simple, very portable, and easy-to-code)

Here, lemme break up a cookie for you...
Attached Files
File Type: zip FullIEFPack2_DistroReady.zip (72.7 KB, 3 views)
__________________
Signature:
WIREMOD WILL NOT WORK ON A PIRATED GMOD!


MY COLOUR IS BLUE.
Post your expressions here: www.wiredexpressions.tk
It's my favourite country song. And I hate it.
IEF015's got his own website :3
IEF015 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #148 (permalink)
cpf
Advanced Member
 
cpf's Avatar
 

Join Date: Nov 2007
Posts: 396
cpf is on a distinguished road
Send a message via MSN to cpf Send a message via Skype™ to cpf
Default Re: WireSim- The Scriptable WireMod Simulator

OK, that, and sounds () will be in the next update. Hopefully timers, and a scheduleThink() function, too
__________________
WireSim.com
Why does everybody say CPF? it's cpf :P
Hey, look! It's a tutorial on using LuaInterface!
cpf is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #149 (permalink)
cpf
Advanced Member
 
cpf's Avatar
 

Join Date: Nov 2007
Posts: 396
cpf is on a distinguished road
Send a message via MSN to cpf Send a message via Skype™ to cpf
Default Re: WireSim- The Scriptable WireMod Simulator

OK, just sent out another update with sounds (), and timers ( too, check wiresim.com for docs)

Oh, and, you may of noticed that there's a new thing in the rightclick menu for chips. What you put in that textbox becomes the chip's label. It's automatically put in the chip's tooltip, and it's saved into savefiles. Sorry, but afaik that makes the adv button obsolete
__________________
WireSim.com
Why does everybody say CPF? it's cpf :P
Hey, look! It's a tutorial on using LuaInterface!

Last edited by cpf; 07-27-2008 at 07:13 PM..
cpf is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2008   #150 (permalink)
<3

 
IEF015's Avatar
 

Join Date: Feb 2008
Location: London, ON (Canada, eh?)
Posts: 765
IEF015 has a spectacular aura aboutIEF015 has a spectacular aura about
Default Re: WireSim- The Scriptable WireMod Simulator

Quote:
Originally Posted by cpf View Post
OK, just sent out another update with sounds (), and timers ( too, check wiresim.com for docs)

Oh, and, you may of noticed that there's a new thing in the rightclick menu for chips. What you put in that textbox becomes the chip's label. It's automatically put in the chip's tooltip, and it's saved into savefiles. Sorry, but afaik that makes the adv button obsolete
YES!!

*starts making new chips*

And, the adv. buttonn isn't... COMPLETELY obsolete. It can still show you what the On/Off values are.
__________________
Signature:
WIREMOD WILL NOT WORK ON A PIRATED GMOD!


MY COLOUR IS BLUE.
Post your expressions here: www.wiredexpressions.tk
It's my favourite country song. And I hate it.
IEF015's got his own website :3
IEF015 is online now  
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

LinkBacks (?)
LinkBack to this Thread: http://www.wiremod.com/forum/wiremod-general-chat/5263-wiresim-scriptable-wiremod-simulator.html
Posted By For Type Date
cpfx.ca - My Work This thread Refback 07-06-2008 02:11 PM
Garry's Mod 2007: We can build it. We have the Orange Box technology - The Something Awful Forums This thread Refback 06-12-2008 06:22 AM


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


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

Page top