jefftrier Posted January 30, 2014 Share Posted January 30, 2014 Hi all, First I would like to say that it's nice meeting this community. I have been playing around with this engine for a few days (random tutorials, prototypes, etc), and I have to say I am very excited about it! Now on to the question! I want to create a pick-up object that disappears when the player walks into it (ammo/health/etc). I know there has to be a basic tutorial on this, but I am having no luck locating one. What I would like to do, is make this call in the Collision function in FPSPlayer.lua. From my understanding, tname should give me the entity name... but none is returned (rather I get 0x00000000, which I imagine in null). function Script:Collision(entity,position,normal,speed) if speed>20 then self:Hurt(100) end tname = entity:GetKeyValue("name") System:Print(tname) end Can someone point me in the right direction? Thanks! -Jeff Quote Link to comment Share on other sites More sharing options...
Rick Posted January 30, 2014 Share Posted January 30, 2014 I did a tutorial on a weapon pickup that does this. http://www.youtube.com/watch?v=VWBGtJ7NQ4Y 1 Quote Link to comment Share on other sites More sharing options...
jefftrier Posted January 30, 2014 Author Share Posted January 30, 2014 Great! Thanks a lot. Quote Link to comment Share on other sites More sharing options...
jefftrier Posted January 30, 2014 Author Share Posted January 30, 2014 That did the trick! Hey, you know... I have to say that this tutorial was FAR more useful than was titled. I think it's perfect for beginners (like me ^.- ) to get started from scratch, and to learn the base mechanics relatively quickly. It may deserve a retitling to "Leadwerks for Newbies", or some-such. Great job on that tutorial! -Jeff Quote Link to comment Share on other sites More sharing options...
Rick Posted January 30, 2014 Share Posted January 30, 2014 I have others on that channel you can check out that help with various other things. Glad you liked it. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 30, 2014 Share Posted January 30, 2014 If you haven't seen this already here is a tutorials post I maintain that holds current tutorials and future tutorial ideas for anyone to create. http://www.leadwerks.com/werkspace/topic/8103-gameplay-tutorial-requests-here/ Quote Link to comment Share on other sites More sharing options...
jefftrier Posted January 31, 2014 Author Share Posted January 31, 2014 Great stuff! I've been watching them. Thanks for putting in the time to create those tutorials... they are really giving me a good start! -Jeff 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.