Topic was automatically imported from the old Question2Answer platform.
Asked By
max123
I am trying to make an fps game, and I’m trying to add weapons, all the tutorials I have looked at tell me to make the gun in the same scene as the player but that does not work for me because I made a system to switch between weapons, and the weapons have to be in a different scene than the player, so I was wondering if anyone knows how to make a gun in a separate scene
Create a new scene and make the gun, save the scene and load it when you need it.
You can preload all the guns (“gun scenes”) when you start the scene with the player
var granade = preload("res://guns/granade")
var shotgun = preload("res://guns/shotgun")
...
and then show/hide/disable then as you need to.
To add a new scene you can click on the plus icon next to your current scene or at the top menu scene > new scene