Jump to content

Fps Controller Custom weapons?->lua


Slastraf
 Share

Recommended Posts

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!smile.png

Link to comment
Share on other sites

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.

  • Upvote 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...