|
Post by D on Sept 15, 2016 17:56:17 GMT
Hi,
I really like the built in music feature but i can't figure out how i can use the fading between say, wave1 and wave2.
I would like the music to fade when wave 1 has ended for like 2 seconds and when wave 2 begins it needs to start playing it's new music when the music from wave 1 had faded to 0.
|
|
|
Post by DarkTonic Dev on Sept 15, 2016 19:57:19 GMT
There is no fading feature. This is only the very most basic music functionality. If you want a TON more music and audio functionality, check out our other plugin Master Audio. Crossfading would take 2 Audio Sources while this only uses one.
|
|
|
Post by D on Sept 15, 2016 22:32:42 GMT
Got it,
so if i buy the Master Audio asset i can use it to fade between 2 audio sources without code?
|
|
|
Post by DarkTonic Dev on Sept 15, 2016 23:23:30 GMT
Most of the time, yes. It comes with a very powerful script that can fire many audio events based on certain Unity events. For example you could make it crossfade to a new song when you kill a boss enemy.
|
|
|
Post by redghostofthenight on Oct 16, 2016 5:53:41 GMT
Hey guys, quick question, when I finish a wave off the music keeps playing? Is that normal?
|
|
|
Post by DarkTonic Dev on Oct 16, 2016 6:00:06 GMT
It will keep playing if you didn't specify a different music for next wave.
|
|
|
Post by redghostofthenight on Oct 24, 2016 3:25:03 GMT
Okay, side question here... what does Preload Qty & Instantiate More mean? Does that create npcs somewhere not spawned yet? If I set spawners to spawn 10 npcs but have 0 Instantiate More but then on the next wave have another 10 they don't spawn?
Reason I ask is because I get this error using Tactical AI ... not sure why but these errors only occur when I try spawning the pool of enemies, not individual prefabs.
Coroutine 'HearSound' couldn't be started because the the game object 'Team 2_LightRusher (Clone 9)' is inactive! UnityEngine.MonoBehaviour:StartCoroutine(String, Object) TacticalAI.TargetScript:HearSound(Vector3) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:412) TacticalAI.ControllerScript:CreateSound(Vector3, Single, Int32[]) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/ControllerScript.cs:109) TacticalAI.TargetScript:AlertAlliesOfEnemy_Shout() (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:398) TacticalAI.TargetScript:ChooseTarget() (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:371) TacticalAI.TargetScript:NoticeATarget(Target) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:236) TacticalAI.TargetScript:CheckForLOSAwareness(Boolean) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:452) TacticalAI.<LoSLoop>c__Iterator2F:MoveNext() (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:130) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
" Coroutine couldn't be started because the the game object 'Team 2_LightRusher (Clone 9)' is inactive! UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) TacticalAI.TargetScript:HearSound(Vector3) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:414) TacticalAI.ControllerScript:CreateSound(Vector3, Single, Int32[]) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/ControllerScript.cs:109) TacticalAI.TargetScript:AlertAlliesOfEnemy_Shout() (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:398) TacticalAI.TargetScript:ChooseTarget() (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:371) TacticalAI.TargetScript:NoticeATarget(Target) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:236) TacticalAI.TargetScript:CheckForLOSAwareness(Boolean) (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:452) TacticalAI.<LoSLoop>c__Iterator2F:MoveNext() (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/TargetScript.cs:130) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)"
|
|
|
Post by DarkTonic Dev on Oct 24, 2016 19:00:33 GMT
It's in the manual but..
1) Preload Qty defines how many clones get created at startup, ready for spawning. 2) Allow Instantiate More controls whether additional clones beyond the Preload Qty will be allowed to be Instantiated (and re-used via pooling) after you are already using all the clones.
So if you have Preload Qty set to 10 and have Allow Instantiate More set to false, and already have 10 spawned (that haven't despawned yet) and want to spawn more, you can't. If you've already despawned those 10, you can spawn 10 again. If you had still 4 spawned, then you'll be able to spawn another 6 before it fails. Repeat any number of times.
Your script in Tactical AI is trying to operate on a despawned clone, which will never work. It will need to first check if the game object is inactive. You can either try your hand at editing that code or contact the author of the plugin and see if they'll do it for you.
|
|
|
Post by redghostofthenight on Oct 25, 2016 1:29:26 GMT
Hey I really appreciate your assistance, I guess I'll have to hold off on this as even the author can't get the system functional. Once again thanks sir!
|
|
|
Post by DarkTonic Dev on Oct 25, 2016 2:01:36 GMT
Sad to hear that but at least you can move forward without broken code.
|
|