Slastraf Posted September 19, 2014 Share Posted September 19, 2014 Hello guys! I am just making a game called "survivor basement" , and I got problems making fps player weapons attached to the script. So basically I am new to leadwerks and there is already an prefab pistol. But what is needed to make a functionally shotgun prefab myself ? -> an lua script attached to it? PS: I know how to create prefabs, i just dont know what is needed to make it functionally Thanks for your time! Quote Link to comment Share on other sites More sharing options...
nick.ace Posted September 19, 2014 Share Posted September 19, 2014 A prefab is just a collection of saved values of an entity. It really doesn't matter if the mesh you have is a prefab or not. That being said, I'm not sure about the pistol, but usually these types of actions are controlled by the FPSPlayer.lua file. So, you aren't required to add any script to the prefab you made, and in fact it would likely to be less efficient if you did. To sum up what I'm saying, take a look at the FPSPlayer.lua file (don't attach it to your prefab). You should easily be able to do what you want to do in there. 1 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.