View unanswered posts | View active topics It is currently Fri Apr 26, 2024 10:42 am



Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
 Lua 
Author Message
User avatar

Joined: Tue Oct 31, 2006 6:10 pm
Posts: 358
Location: at ze kopta!
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Feb 10, 2007 4:56 pm
Posts: 106
Location: Great Britain.Bedfordshire.
Reply with quote
Post Re: Lua
If there was only a way you could use either one.


Sun Jul 15, 2007 9:25 am
Profile
User avatar

Joined: Sun Mar 18, 2007 5:35 am
Posts: 3778
Location: Largo, Florida
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Fri Jul 13, 2007 12:11 pm
Posts: 15
Location: Xera
Reply with quote
Post 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.


Last edited by Xera on Sun Jul 15, 2007 11:05 am, edited 1 time in total.



Sun Jul 15, 2007 11:02 am
Profile
User avatar

Joined: Wed Nov 22, 2006 3:19 pm
Posts: 2073
Reply with quote
Post 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
Profile
User avatar

Joined: Fri Jul 13, 2007 12:11 pm
Posts: 15
Location: Xera
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Nov 22, 2006 3:19 pm
Posts: 2073
Reply with quote
Post 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
Profile
User avatar

Joined: Fri Jul 13, 2007 12:11 pm
Posts: 15
Location: Xera
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Nov 22, 2006 3:19 pm
Posts: 2073
Reply with quote
Post Re: Lua
Oh, you wanna go for a flamefight?
Bring. It. On.


Sun Jul 15, 2007 11:13 am
Profile
User avatar

Joined: Fri Jul 13, 2007 12:11 pm
Posts: 15
Location: Xera
Reply with quote
Post Re: Lua
MaximDude wrote:
Oh, you wanna go for a flamefight?
Bring. It. On.

Image

Ho ho ho. :P


Sun Jul 15, 2007 11:31 am
Profile
User avatar

Joined: Wed Nov 22, 2006 3:19 pm
Posts: 2073
Reply with quote
Post Re: Lua
You even fail at flaming...
Im outa here, cya retard


Sun Jul 15, 2007 11:33 am
Profile
User avatar

Joined: Fri Jul 13, 2007 12:11 pm
Posts: 15
Location: Xera
Reply with quote
Post 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
Profile
Banned
User avatar

Joined: Tue Feb 27, 2007 4:05 pm
Posts: 2527
Reply with quote
Post 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
Profile YIM

Joined: Sun Jun 24, 2007 6:13 am
Posts: 505
Reply with quote
Post 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. :grin:


Sun Jul 15, 2007 4:33 pm
Profile

Joined: Mon Dec 04, 2006 3:34 am
Posts: 2378
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.113s | 15 Queries | GZIP : Off ]