Shard Posted February 11, 2010 Share Posted February 11, 2010 Hey guys, I have a quick question. How do I create a Lua file so that I can declare the class of each object? I want to do this so that I can read in each object with out having to check for each objects name, because that requires that each object be individually named and there can be typos and whatnot that can go wrong. If I code the class before hand, that problem is dealt with easily. Thanks -Shard Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Josh Posted February 12, 2010 Share Posted February 12, 2010 Double-click on the class node in the editor to open the class script. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Shard Posted February 12, 2010 Author Share Posted February 12, 2010 Double-click on the class node in the editor to open the class script. Thanks Josh, but I know how to open it. the problem that I'm having is that I don't know how to define a class in code. From my level sbx: Model { path="info_player_node.gmf" position=-1.00000000,1.00000000,18.0000000 rotation=-0.000000000,-0.000000000,0.000000000 scale=1.00000000,1.00000000,1.00000000 id=211024872 "class"="Model" "name"="baseEnemy" } Instead of the name being baseEnemy, I want the class to be baseEnemy for all my baseEnemy nodes. Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
DaDonik Posted February 12, 2010 Share Posted February 12, 2010 In what language do you want to code your class in? Lua or C/C++ Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted February 12, 2010 Share Posted February 12, 2010 I would assume he means in lua.. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
DaDonik Posted February 12, 2010 Share Posted February 12, 2010 Oh well...then it's not possible for me to help Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted April 7, 2010 Share Posted April 7, 2010 a lil late on the reply... and you've probably found htis already... but if you haven't... look here --> lua script tutorial ... scroll down to plage 14 for classes... it should at least give you a lil insight on what's going on... good luck... --Mike Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.