fumanshoo Posted December 20, 2012 Share Posted December 20, 2012 Why is it that if I LoadModel, I can set the collision type, but I can not SetColor(Vec4( ect... but if I LoadMesh, I can Set the color but can not set the collision type? I kinda need to do both in this situation... Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 20, 2012 Share Posted December 20, 2012 Collisions only work on bodies and terrains. LoadModel will load/create an invisible physics body with the visible mesh as the child. LoadMesh just loads the visible mesh. Since you want to color the visible child mesh of the model, you have to set the recursive parameter to 1. entity:SetColor( color:TVec4, recursive ) Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
fumanshoo Posted December 20, 2012 Author Share Posted December 20, 2012 sceneBuildings = LoadModel("abstract::general visualization of the slums.gmf") sceneBuildings:SetPosition(Vec3(0,-.05,0)) sceneBuildings: SetCollisionType(2) EntityColor(sceneBuildings,Vec4(.5,.5,.5,.5,1)) Is this what you mean? I am still not getting the desired effects.... Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 20, 2012 Share Posted December 20, 2012 EntityColor(sceneBuildings,Vec4(.5,.5,.5,.5,1)) i am assuming you are using lua, so it should be: sceneBuildings:SetColor(Vec4(.5,.5,.5,.5),1) you know if you used the editor to create your scene, you could easily set these properties with the property dialog... just a suggestion. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
fumanshoo Posted December 20, 2012 Author Share Posted December 20, 2012 Well I love the Editor and I had already created the scene in the Editor, but I want to learn more about the Script Editor mostly because I suck at programming in general. The Editor is very reliable and easy, but I just want to learn more. Programming is beginning to become more of a fun thing to me than a chore. Thanks a lot for the help and sorry, I should have told you that I was using Lua Script. Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 20, 2012 Share Posted December 20, 2012 well you can still learn these basics by using the editor - just look inside the class.lua script located in the Scripts folder to see how the basics commands are used for the property dialog. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
fumanshoo Posted December 20, 2012 Author Share Posted December 20, 2012 I think it may take me a little more time to learn all of that. commands... or at least I think they are command like "self.model" and "self.super" confuse the hell out of me. Same with "group:" and "class" I'm just not advanced enough as a user to understand it quite yet, but I am getting there. If you would be willing to privately teach me ( which I highly doubt would ever happen haha ) and help me understand the class file or better yet how to make a controller that is compatible with the game script path, I would be very appreciative, but until then, I am happy with slowly learning on my own haha. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 20, 2012 Share Posted December 20, 2012 In Leadwerks 3, there is just a model class, and all entities can have scripts and physics. FYI. 1 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...
fumanshoo Posted December 20, 2012 Author Share Posted December 20, 2012 YES! It seems that every day, I learn about something great that will come out of LE3. I just can't wait for it's release! So exited Quote Link to comment Share on other sites More sharing options...
cassius Posted December 20, 2012 Share Posted December 20, 2012 Just curious. but why are you using code to place buildings in your game when its easier and faster to place them in the editor and then load them in with your scene with loadscene ?Thats what the editor is designed for. EDIT:You can always use findchild to refer to them. I only load characters in code ( with LoadMesh) Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
fumanshoo Posted December 20, 2012 Author Share Posted December 20, 2012 Well, like I said earlier, I used to use the Editor, but I want to better myself when it comes to programming and I think little things like this help. It's not like this little practice is ACTUALLY being used, it's all being put into a dummy scene where I just fool around with stuff. It's helpful too because I had no idea what recursive meant until now. Well, I shouldn't say that I USED to use the Editor because I still do, but not for my little test lab scene... Quote Link to comment Share on other sites More sharing options...
cassius Posted December 20, 2012 Share Posted December 20, 2012 Ok. Good luck with your programming. 1 Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ 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.