Rick Posted March 2, 2013 Posted March 2, 2013 I have 2 different goblin models and a plant enemy model. These are all loaded with LoadMesh(). I set an entity key when I load these called "type" and I set it to "enemy". When I do a CameraPick I take the p.entity and get the entity key. For the goblins I get the value "enemy" as I would expect, but the plant returns an empty string. When I examine the TEntity address when loaded vs when picked the goblins are the same but the plant enemy is not. Any ideas why the plant enemy is acting different given the above description? Quote
Rick Posted March 2, 2013 Author Posted March 2, 2013 You know what, nevermind. I'll just make separate cube meshes for selection to make selecting less precise and easier and so I don't have to worry about how models are setup. Quote
YouGroove Posted March 2, 2013 Posted March 2, 2013 Don't it come from some shared script or common Lua file ? You instanciate all by code and don't use the world editor ? Quote Stop toying and make games
Road Kill Kenny Posted March 2, 2013 Posted March 2, 2013 Rick that is odd indeed. If you are indeed setting the entity key for the plant the same as the models it should work. It has in the past for me. Often I find when these anomalies happen there is a silly mistake somewhere. I don't know how many times I thought my code was fine and in the end it often turns out to be something rather silly. Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!
Rick Posted March 2, 2013 Author Posted March 2, 2013 Yeah, it's odd, but actually using a cube mesh is working out better. Since this is set for mainly mobile, selecting the enemies will be much easier when it's a bigger more generic shape like a cube than the model itself. So in the end it helped me see that, which is good Thanks guys. Quote
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.