I've been trying to start my FPS player off with no weapon. I need him to start off where there is a shot gun on the wall that he can pickup and equip. I added an empty game object to my
First Person controller
Which seems to work ok, unless you press fire and then you get a error message.
BroadcastMessage Fire has no receiver! UnityEngine.Component:BroadcastMessage(String) PlayerWeapons:Update() (at Assets/WeaponScripts/PlayerWeapons.js:13)
I know why but not sure how to fix it so when I have no weapon it's not able to fire. Unless I make it fire nothing and cause no damage to anything, I suppose that might work but it seems to me there is most likely a more proper way to do this?
I put a script on the "NoWeapon" empty game object:
And that got rid of the error because the broadcast fire now has a receiver now, but like I say there is probably a more proper way of doing this?