0
Under review

Charged Shot trigger - Weapon does not fire on reloaded scene

heysarahshere 4 months ago in Shooter updated 4 months ago 2

If I load the last save, or load scene B from scene A, the weapon trigger stops working. The reload trigger works, but no charged shot will start. I switched to 'disable charged shots' but the trigger still did not work. The pool of projectile objects don't load. 

I have tried adding the start and execute charged shot triggers to the weapon prefab, to the player, or just in the scene, but nothing changes.

My player character is in each scene in a prefab with the camera and camera motor, and the player has player shooter, player equipment, and a player hook.

This is the way the ammo is set up:

How do I make sure the trigger saves correctly? I will try to see if it works when not using projectiles, but I would really like to keep it this way.

Unity version:
2018.4.22f1
Game Creator version:
1.1.8
Under review

Triggers don't really get saved, so it should work out of the box. One question though. Do you have this Trigger in both SceneA and SceneB? 

When you load a game/scene, the player and any related objects do not get transferred to the new scene. I recommend making an empty game object where you put all common Triggers that the player will use throughout all levels and create a prefab out of it. Then, all you have to do is drag and drop this prefab onto every scene. Any changes you made to this prefab will also be retro-applied to the rest of the scenes.

I only have one scene where the weapon is used. The first scene is just a menu. I do have a prefab with all of the triggers, and the equip/reload ones work fine. It seems like the issue might be with the projectiles or the trajectory maybe. All other aspects work, and I don't get any errors or anything. 

Here's another strange thing about it: now it only happens when loading the saved game AFTER stopping playing. If I save a game, then load that saved game from the main menu or death screen and then load the saved game all while keeping the game going, the weapon functions fine. But if I stop completely and try to reload the saved game, the weapon won't fire. The more I try to fix it, I'm just ending up with more questions! Sorry, I'm sure I did something to cause it D:

Edited for clarity.