Author |
Message |
couchcaboose
Joined: Tue Oct 31, 2006 6:10 pm Posts: 358 Location: at ze kopta!
|
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.
|
Sun Jul 15, 2007 3:11 am |
|
|
Fuzzo
Joined: Sat Feb 10, 2007 4:56 pm Posts: 106 Location: Great Britain.Bedfordshire.
|
Re: Lua
If there was only a way you could use either one.
|
Sun Jul 15, 2007 9:25 am |
|
|
venn177
Joined: Sun Mar 18, 2007 5:35 am Posts: 3778 Location: Largo, Florida
|
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.
|
Sun Jul 15, 2007 11:00 am |
|
|
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
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/TutorialDirectoryLua is pretty much the simplest scripting language besides HTML, just about anybody can pick it up in a few hours.
Last edited by Xera on Sun Jul 15, 2007 11:05 am, edited 1 time in total.
|
Sun Jul 15, 2007 11:02 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: Lua
Lua in CC is fail Nuff said If you want it, go do it yourself Mr. Im so good with Lua
|
Sun Jul 15, 2007 11:04 am |
|
|
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
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.
|
Sun Jul 15, 2007 11:08 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: Lua
Ofcourse there is no need But I am hostile, because im pissed End of stroy
Lock naouw
|
Sun Jul 15, 2007 11:09 am |
|
|
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
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..
|
Sun Jul 15, 2007 11:12 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: Lua
Oh, you wanna go for a flamefight? Bring. It. On.
|
Sun Jul 15, 2007 11:13 am |
|
|
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
Re: Lua
MaximDude wrote: Oh, you wanna go for a flamefight? Bring. It. On. Ho ho ho.
|
Sun Jul 15, 2007 11:31 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: Lua
You even fail at flaming... Im outa here, cya retard
|
Sun Jul 15, 2007 11:33 am |
|
|
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
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'.
|
Sun Jul 15, 2007 11:35 am |
|
|
ProjektTHOR
Banned
Joined: Tue Feb 27, 2007 4:05 pm Posts: 2527
|
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.
|
Sun Jul 15, 2007 2:12 pm |
|
|
Pyrorex
Joined: Sun Jun 24, 2007 6:13 am Posts: 505
|
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.
|
Sun Jul 15, 2007 4:33 pm |
|
|
Alenth Eneil
Joined: Mon Dec 04, 2006 3:34 am Posts: 2378
|
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.
|
Sun Jul 15, 2007 8:10 pm |
|
|
|