Hello,
I have trouble finding a manual how to create own objects, although I belive that LUA supports them

Here is an example of what I wanna do:


Code:
PDEUSOCODE: 

for n=1,2 do
 player[n]=new.player
end

-----

object player
 function fire() ...
 function die() ...
 local hp...
 local ammunition...
end

---

player[1].fire(20)
player[1].hp = player[1].hp - 20
player[2].die()

...

well, you got what I mean?
For a bigger project I need to be able to organize functions and variables in objects.
It´s not a big deal in VBasic, but how is the syntax in LUA?


Thanks!