Data Realms Fan Forums http://forums.datarealms.com/ |
|
Lua http://forums.datarealms.com/viewtopic.php?f=1&t=6339 |
Page 2 of 5 |
Author: | couchcaboose [ Sun Jul 15, 2007 3:11 am ] |
Post subject: | Re: Lua |
Wow. I looked at the comparison... The Coding used right now looks understandable and MUCH cleaner than the LUA code. It's simple to understand the code,but LUA code looks difficult and I would not like to deal with it. Code: InstanceName = Particle Supreme Digger Mass = 0.2 RestThreshold = 500 InstanceName is simple, it's the name Mass is a given, the mass of the object. RestThreshold, the life or the amount of time before it 'dies' Code: AddCSLuaFile("autorun/healthfix.lua") function UpdateHealth() local Ents = ents.GetAll() for k,v in pairs(Ents) do if(v:GetHealth() != v:Health()) then v:SetNWFloat("hp", v:Health()) end if(v:GetNWMaxHealth() != v:GetMaxHealth()) then v:SetNWFloat("maxhp", v:GetMaxHealth()) end Wtf, I don't know any of it. It's too spread around the place. The variables are also scattered around, and it looks messy. The code right now is fine. No need to change it. Period. Pyrorex wrote: It takes finesse to make it efficient. You just haven't done enough for it to be easy and clean. I like how he said it. |
Author: | Fuzzo [ Sun Jul 15, 2007 9:25 am ] |
Post subject: | Re: Lua |
If there was only a way you could use either one. |
Author: | venn177 [ Sun Jul 15, 2007 11:00 am ] |
Post subject: | Re: Lua |
Fuzzo wrote: If there was only a way you could use either one. Yeah, and DirtMaster would only have to spend 10 years on recoding everything for lua which he doesn't need. |
Author: | Xera [ Sun Jul 15, 2007 11:02 am ] |
Post subject: | Re: Lua |
couchcaboose wrote: Wow. I looked at the comparison... The Coding used right now looks understandable and MUCH cleaner than the LUA code. It's simple to understand the code,but LUA code looks difficult and I would not like to deal with it. Code: InstanceName = Particle Supreme Digger Mass = 0.2 RestThreshold = 500 InstanceName is simple, it's the name Mass is a given, the mass of the object. RestThreshold, the life or the amount of time before it 'dies' Code: AddCSLuaFile("autorun/healthfix.lua") function UpdateHealth() local Ents = ents.GetAll() for k,v in pairs(Ents) do if(v:GetHealth() != v:Health()) then v:SetNWFloat("hp", v:Health()) end if(v:GetNWMaxHealth() != v:GetMaxHealth()) then v:SetNWFloat("maxhp", v:GetMaxHealth()) end Wtf, I don't know any of it. It's too spread around the place. The variables are also scattered around, and it looks messy. The code right now is fine. No need to change it. Period. Pyrorex wrote: It takes finesse to make it efficient. You just haven't done enough for it to be easy and clean. I like how he said it. Yeah, that example was pretty bad, but, imagine being able to do something like.. Code: local Door = NewEntity() --Create a new entity in the world SetSprite(Door, "doorclosed.bmp") --Set the sprite of "Door" to doorclosed.bmp SetPosition(Door, 100, 100) --Set the X/Y of "Door" to 100/100 SetRotation(Door, 180) --Set the rotation of "Door" to 180 degrees function Door.OnTouchedByClone(Clone) --When the "Door" is touched by a clone this is run and "Clone" is the clone that touched it if(Clone.Team == "red") then --If the clone is on the red team then.. SetSprite(Door, "dooropen.bmp") --Set the sprite to dooropen.bmp timer.Set("CloseTheDoorAfter5Seconds", SetSprite(Door, "doorclosed.bmp")) --After 5 seconds set the sprite to doorclosed.bmp end end Here, have a read http://lua-users.org/wiki/TutorialDirectory Lua is pretty much the simplest scripting language besides HTML, just about anybody can pick it up in a few hours. |
Author: | MaximDude [ Sun Jul 15, 2007 11:04 am ] |
Post subject: | Re: Lua |
Lua in CC is fail Nuff said If you want it, go do it yourself Mr. Im so good with Lua |
Author: | Xera [ Sun Jul 15, 2007 11:08 am ] |
Post subject: | Re: Lua |
MaximDude wrote: Lua in CC is fail Nuff said If you want it, go do it yourself Mr. Im so good with Lua No need to be so hostile. |
Author: | MaximDude [ Sun Jul 15, 2007 11:09 am ] |
Post subject: | Re: Lua |
Ofcourse there is no need But I am hostile, because im pissed End of stroy Lock naouw |
Author: | Xera [ Sun Jul 15, 2007 11:12 am ] |
Post subject: | Re: Lua |
MaximDude wrote: Ofcourse there is no need But I am hostile, because im pissed End of stroy Lock naouw Must.. resist.. urge.. to.. flame.. |
Author: | MaximDude [ Sun Jul 15, 2007 11:13 am ] |
Post subject: | Re: Lua |
Oh, you wanna go for a flamefight? Bring. It. On. |
Author: | Xera [ Sun Jul 15, 2007 11:31 am ] |
Post subject: | Re: Lua |
MaximDude wrote: Oh, you wanna go for a flamefight? Bring. It. On. Ho ho ho. |
Author: | MaximDude [ Sun Jul 15, 2007 11:33 am ] |
Post subject: | Re: Lua |
You even fail at flaming... Im outa here, cya retard |
Author: | Xera [ Sun Jul 15, 2007 11:35 am ] |
Post subject: | Re: Lua |
MaximDude wrote: You even fail at flaming... Im outa here, cya retard It's a little thing we have now a days called a 'joke'. |
Author: | ProjektTHOR [ Sun Jul 15, 2007 2:12 pm ] |
Post subject: | Re: Lua |
MaximDude wrote: Ofcourse there is no need But I am hostile, because im pissed End of stroy Lock naouw We're not going to lock a thread on the sheer whim of you being upset. Get your attitude in order. |
Author: | Pyrorex [ Sun Jul 15, 2007 4:33 pm ] |
Post subject: | Re: Lua |
Xera, you can learn to mod CC in about 5 minutes. Plus, GMOD(Which is one of the primary LUA users) is a full game, CC is in TEST builds, so the final product will be a lot more clean and tidy, and have a lot more things for us to toy with. Maximdude, you need to chill. Normally I agree with you, but something's messed up with you lately. Couchcaboose, thanks. I like the way that sounded too. |
Author: | Alenth Eneil [ Sun Jul 15, 2007 8:10 pm ] |
Post subject: | Re: Lua |
Maxim is looking for a ban recently... But yeah, I don't see why we need anything near as powerful as lua, if data wants to add more capability he can edit what he's already made. |
Page 2 of 5 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |