Please Add / Modify the following Scripts in next Versions

neubern

Member
This would help me next times when there's an Update :D


Add Events to ShootableWeapon.cs:
[Tooltip("Unity event that is invoked when the item is Used.")] [SerializeField] protected UnityEvent m_OnWeaponFiredEvent; [Tooltip("Unity event that is invoked when the item is Reloaded.")] [SerializeField] protected UnityEvent m_OnReloadCompleteEventt; public UnityEvent OnWeaponFiredEvent { get { return m_OnWeaponFiredEvent; } set { m_OnWeaponFiredEvent = value; } } public UnityEvent OnReloadCompleteEvent { get { return m_OnReloadCompleteEvent; } set { m_OnReloadCompleteEvent = value; } } Under Fire() if (m_OnWeaponFiredEvent != null) { m_OnWeaponFiredEvent.Invoke(); } Under ItemReloadComplete() if (m_OnReloadCompleteEvent != null) { m_OnReloadCompleteEvent.Invoke(); }



Editor Version of ShootableWeaponInspector.cs :
if (Foldout("Events")) { EditorGUI.indentLevel++; Shared.Editor.Inspectors.Utility.InspectorUtility.UnityEventPropertyField(PropertyFromName("m_OnWeaponFiredEvent")); Shared.Editor.Inspectors.Utility.InspectorUtility.UnityEventPropertyField(PropertyFromName("m_OnReloadCompleteEvent")); EditorGUI.indentLevel--; }
 
I have a weapon set up similarly to the rocket launcher, does this allow it the explosion damage to work with damage processor? Was gonna make a post but this looks like same subject
 
Adding the DamageProcessor to the Inspector, and then adding the DamageProcessor to the ExplosionDamage allows this usage. Something I also needed, and it didn't worked unless specifying the DamageProcessor IN the Explosion Component.
 
Top