Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I really want to make a gun mod but I am unsure how to make a magazine with a shooting gun. Also with a GUI telling you how many bullets you have left. Can someone teach me how please? I am willing to reward whoever helps me successfully make a gun mod (Only 1 gun is needed, I can figure it out on my own for other guns).

Well Lambda that's true, however not enough leads for Skullmassarce to work with, only half.

 

So following Lambda's advice see some tutorials on making items and registering them (and configuring the JSONs for the textures and whatnot)

 

once you have that done, you will want to look at some vanilla code aka like Lambda mentioned the bow (for the right-click to shoot function)

 

Then once you have the "gun" functioning with "ammo" which at this point will act like the bow (consume ammo from the inventory) now it sounds like you want a "reload" aka extra ammo in inventory but gun can be loaded and shoot as long as it is loaded.

 

If that is the case you will have to look into capabilities (so you can store extra data)

 

after once that is all setup it will be looking into other things (key presses for force reload, if they can reload, auto reload if gun is empty and ammo is ready)

 

EDIT:

 

but it depends on how you WANT it to work, you could have the ammo just have durability and have them limited to stackSize of "1" and the durability is the ammo in the mag/clip. But the effects of that would more or less be no reload (just burn through the clips, classic and 2016 DOOM anyone?)

For starter I recommend looking at bow and how it uses arrows from inventory. Try to make a variation of the bow but make it a pistol model + bullet arrows. Once you figured all that then I recommend figuring it out how to do a gui overlay. Then you can keep expanding on the pistol bow until you get what you want. 

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.