Search Unity

Core GameKit! Pooling / Spawning / Combat

Discussion in 'Assets and Asset Store' started by jerotas, Jan 27, 2013.

  1. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Just submitted V.2.6.9, includes the following:

    - Added Skip Wave Type to Waves in Level Settings. You can choose None, Always, IfWorldVariableValueAbove or IfWorldVariableValueBelow and add WorldVariable conditions to skip the wave.
    - Added Wave Skipped event in LevelSettingsListener.
    - Removed "Active" checkbox on Prefab Pool Items. Added Active Item Mode instead. Choices are Always (default), Never, IfWorldVariableInsideRange IfWorldVariableOutsideRange. This lets you control which items are in the Prefab Pool based on XP, Score, etc. They are re-evaluated each time the Prefab Pool re-fills.
    - Added Custom Start Wave setting in Level Settings so you can start playing on the level and wave you select. You can toggle this on and off. Great for testing higher waves!
    - Removed "exhaustive list" checkbox for Prefab Pools when non-random. Only applies to random.
    - Added up and down arrows for Prefab Pool items, for organizational purposes.

    Now we will be update to date! If anyone would like this version before Asset Store approval, email me directly with your invoice# at jerotas2005@yahoo.com

    Thank you!
     
  2. quantumsheep

    quantumsheep

    Joined:
    Mar 9, 2013
    Posts:
    37
    Already bought this, but not had a chance to play as I'm finishing off another game!

    Very much looking forward to trying it out though, and I will have loads of suggestions I'm sure! ;)

    Got to keep you busy, sir!

    QS =D
     
  3. radimoto

    radimoto

    Joined:
    Aug 23, 2012
    Posts:
    257
    Hi jerotas,

    Using version 2.6.7, if I switch to Web Player it returns the following error:

    Assets/KillerWaves/Scripts/Utility/PlayerPrefs.cs(224,51): error CS0117: `System.IO.File' does not contain a definition for `CreateText'

    This is on Unity 4.2.2f1.

    The Web Player API Compatibility Level is "Webplayer Subset" and can't be changed...
     
  4. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi,

    I am using an the UFPS system with their newly released AI system.

    Now, I want to integrate wave spawning with this, however I need to know how to alert KillerWaves that an object has died. The Killable script looks great, but I already have a Health system in place.

    Is there a method I can call to alert KillerWaves via a script that an object has been killed?

    Adam
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm taking a look at this. It's likely that you won't be able to use the cached Player Prefs and will have to go back to normal Player Prefs for Web Player. If so I'll provide instructions on how to downgrade.
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    radimoto, unfortunately on the build settings / player settings tab in Unity, WebPlayer mode has an API Compatibility Level of "Webplayer subset" and it can't be changed. So this method is unavailable. Here's how to downgrade to the normal non-cached version of Player Prefs.

    1) Delete the file Utility/PlayerPrefs.cs
    2) Remove this line from the top of InGameWorldVariable.cs
    Code (csharp):
    1. using PlayerPrefs = PreviewLabs.PlayerPrefs;
    3) Line 44, in InGameWorldVariable.cs, remove this line of code:
    Code (csharp):
    1. PlayerPrefs.Flush();
    And you should be good to go. it worked for me. If you get an error when playing, you may need to reset your World Variables to zero using the WorldVariableResetter script since they were using the cached version before.
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I suggest you still use the Killable script to modify other World Variables you may need, or even if you don't need them, because in the Inspector under the Despawn Triggers section, the HP Despawn Mode has a setting for "None". If you use this, Killables won't die from any amount of Hit Points. You will need to call the Killable's DespawnKillable method manually when it is killed through other means. That way you can use the rest of the Killable features.

    Oops - I see I forgot to put this "None" setting in the ReadMe PDF. Will add now!
     
    Last edited: Oct 19, 2013
  8. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Could you explain what the difference between PoolManager5 and Killer Waves?
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    They have zero feature overlap actually. Pool Manager creates pools of objects so you don't Instantiate and Destroy anything because that's terrible for performance on mobile devices. That's all it does.

    Killer Waves lets you set up waves of enemies, power-ups or anything else with multiple spawners per wave. Tons of options. Also it includes triggered spawners (based on events that happen such as triggers / visible etc), Killables and World Variables. These two can track score, health, experience points, etc and has automatic hit point management of all objects. I suggest you watch the videos in the OP in this thread.

    Killer Waves can actually integrate with Pool Manager (which I recommend) by changing just a couple lines of code. This is in the documentation.

    Thank you!
     
  10. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    I believe that there is no example of how to integrate the two assets? Then Killer Waves does not have resources PoolManager5? The two are needed in a project like this?
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes, both would be needed. To enable Pooling Manager integration in Killer Waves, you just swap out 2 sections of code in SpawnUtility.cs. The Pool Manager code is already in there, commented out. Then you enter the name of your Prefab Pool there.
     
  12. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66

    thanks for the information. Will help in making my decision. If you need help to integrate the two I can count on you, right?
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can always count on me :) I'm very experience with Pool Manager as well.
     
  14. Socrates

    Socrates

    Joined:
    Mar 29, 2011
    Posts:
    787
    I use Killer Waves and Pool Manager together. The PDF readme for Killer Waves tell you on page 8 exactly what to do in Kill Waves to make is use a Pool Manager pool. So far, they play nicely and I have had zero problems.
     
  15. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    ha caught you napping again ;)

    here i gotz some more ideas, which i need for my game...

    please add dynamic wave / spawn generator

    ok here is how it could work

    you can specify initial values sort of default for wave 1 (if you were to start at wave 1)

    and you can specify how much to increase these default values each subsequent spawn

    and you can specify how much to increase these default values each subsequent wave

    you can specify the starting wave number and the number of waves and/or ending wave number

    if starting wave number is not 1 then it will run the equation iteratively until it cumulatively reaches the values for the starting wave number.

    i guess if you specify number of waves you can add that to starting wave number and if you specify ending wave number you can always calulate number of waves...

    if the math results are 0 then 0 of that spawn will be spawned in the wave

    we can specify overall default values

    we can specify overall default values for each spawn (so we can override the above for each spawn that will be spawned in a wave)

    we can specify overall default values for each wave if we want (override the above for the wave(s) specified)

    we can specify overall default values for each spawn for eawave if we want (override the above for the wave(s) specified)

    we can specify number of spawn and the number they will be increased or decreased by, basically how many will be spawned in a wave

    we can specify health points of spawn (health) and the number they will be increased or decreased by, basically increases how hard spawn are to kill

    we can specify hit points of spawn (damage) and the number they will be increased or decreased by, basically increases how much damage a spawn will inflict when they hit you (i guess this could be per weapon)

    we can specify things delay between spawning a spawns, basically how quickly they will spawn in a wave

    you can specify things like how long to wait between end of a wave and the when the next wave/spawning will start.

    all the above will be scaled based on all the logic...

    so basically you can reduce/increase the numbers based on the values you use.

    so example you can specify negative and reduce and positive and increase

    so that way you can specify to increase how much build time or reduce how much build time between waives based on a number of things such as the wave number, the number of players and the xp of each player.

    of you can specify which spawns and number, health, damage, interval of spawns based on the wave number, the number of players, the xp of each player.

    basically this would allow us to setup like rules and values and let it play out without manually specifying the wave. it also adds the concept of based on number of players and each player xp. and allow us to specify some specific +/- value or some +/-% that would be applied.

    then it would generate the stuff that killer waves uses. without us specifying the real values.

    so what do you think, it could even be an new addon.
     
    Last edited: Oct 22, 2013
  16. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    also have concept of boss wave(s) where spawns continue until boss(es) are killed. then it stops and all still alive drop dead and are destroyed....

    so you can specify which spawn is boss and which are not and when you kill off all the boss spawns it does the rest in. i guess they need the boss to stay alive!
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's cool, I'll write it down and see if I can come up with something like this (and the last post as well).
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Killer Waves V2.6.9 is live! Get the AI you've wanted! More on the way.
     
  19. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    congrats on the new release

    here let me expand on the dynamic wave thingy

    here is what i thought it could be like

    // regardless of starting wave number when we run the thing we start the math at wave 1 and repeat until we are at the starting wave number

    // so if some value was defined as 1.0 and each wave we will be incrementing by .5 and if startingWaveNumber was 3 then we would have the value at wave 1 set to 1.0, wave 2 set 1.5 and wave 3 set to 2.0 and so forth...

    so here we setup the level, waves, characters, weapons (i guess abilities) and such

    Code (csharp):
    1.  
    2. public class LevelDefinition
    3. {
    4.      public string levelName // way to reference the level
    5.  
    6.      public int startingWaveNumber
    7.      public int endingWaveNumber
    8.  
    9.      public WaveDefinition[] waveDefinitionss
    10. }
    11.  
    12. public class WaveDefinition
    13. {
    14.      public bool bossWave
    15.  
    16.      public CharacterDefinition[] characterDefinitionss
    17. }
    18.  
    19. public class CharacterDefinition
    20. {
    21.      public string characterName // way to reference the character
    22.  
    23.      public float health
    24.  
    25.      public WeaponDefinition[] weaponDefinitionss
    26. }
    27.  
    28. public class WeaponDefinition
    29. {
    30.      public string weaponName // way to reference the weapon
    31.  
    32.      public float indurance
    33.      public float damage
    34.      public float rate // i guess this is the cooldown period
    35. }
    36.  
    so that setups the thing and defaults

    now we need to define what gets incremented and decremented at each wave. we use 0 to mean no increment and no decrement and we use negative numbers to mean decrement and we use positive numbers to mean increment. its a percentage so .5 = 50% increment added to base value. not last value. otherwise its not linear and would grow with each wave. i guess we could have a toggle to indicate whether we want increment / decrement amounts to be calculated only once at 1st wave or at each wave and then have our cake and eat it...


    now that we have basically talked to death how to define some defaults. here are like what i thought could be used for dynamic definitions that would be applied.

    Code (csharp):
    1.  
    2. public class LevelRule
    3. {
    4.      public string levelName // way to reference the level
    5.  
    6.      // that toggle i spoke about whether we should apply the math to last values per wave or should we do it just for 1st wave and then us.
    7.      public bool calculatePerWave
    8.  
    9.      // way to specify it per wave
    10.      public WaveRule[] waveRules // optional list
    11.  
    12.  
    13.      // else way to specify it globally
    14.      // so if above one of the wave rules dont match it uses the following globals
    15.  
    16.      public WaveRule defaultWaveRule
    17. }
    18.  
    19. public class WaveRule
    20. {
    21.      //so if endingWaveNumber  is 1 then the rule will be applied starting and including wave 1
    22.      // ignore for defaultWaveRule
    23.      public int startingWaveNumber // optional starting wave number when definition will be applied
    24.  
    25.      //so if endingWaveNumber  is 10 then the rule will be applied up to and including wave 10
    26.      // ignore for defaultWaveRule
    27.      public int endingWaveNumber // optional ending wave number when definition will be applied
    28.  
    29.      // way to specify it per character
    30.      public CharacterRule[] characterRules
    31.  
    32.  
    33.      // must be defined
    34.      // else way to specify it globally
    35.      // so if above one of the character rules dont match it uses the following globals
    36.  
    37.      public CharacterRule defaultCharacterRule // optional list
    38. }
    39.  
    40. public class CharacterRule
    41. {
    42.      public string characterName // way to reference the character
    43.  
    44.      public float health
    45.  
    46.      // way to specify it per weapon
    47.      public WeaponRule[] weaponRules
    48.  
    49.      // must be defined
    50.      // else way to specify it globally
    51.      // so if above one of the weapon rules dont match it uses the following globals
    52.  
    53.      public WeaponRule defaultWeaponRule // optional list
    54. }
    55.  
    56. public class WeaponRule
    57. {
    58.      public string weaponName // way to reference the weapon
    59.  
    60.      public float indurance
    61.      public float damage
    62.      public float rate // i guess this is the cooldown period
    63. }
    64.  
    so at load time we instantiate the following classes and set the values defined in the values and set waveNumber to 1

    Code (csharp):
    1.  
    2. public class Level
    3. {
    4.      public string Name // way to reference the character
    5.  
    6.      public int waveNumber
    7.  
    8.      public Wave wave
    9. }
    10.  
    11. // at load time we set bossWave to the value set in the definiton
    12.  
    13. public class Wave
    14. {
    15.      public bool bossWave
    16.  
    17.      public Character[] characters
    18. }
    19.  
    20. public class Character
    21. {
    22.      public GameObject character // resolved to some game object
    23.  
    24.      public float health
    25.  
    26.      public Weapon[] weapons
    27. }
    28.  
    29. public class Weapon
    30. {
    31.      public GameObject weapon // resolved to some game object
    32.  
    33.      public float indurance
    34.      public float damage
    35.      public float rate // i guess this is the cooldown period
    36. }
    37.  
    so now for each wave depending on the toggle calculatePerWave we do the math the 1st time to rules and sort of save the increment/decrement values in some copy of runtime classes to cache the values or calculate them based on the value of the runtime values

    anyways that is just a stab at it to make the wall of text i posted more readable... well hopefully more readable, cause this is looking like just another wall of text ;)

    number of very popular tower defense / fps mixed game i play sort of do the above.

    also they scale it per number of player and xp (level) of the players, but i did not add that to the classes, let me now go back and add it basically you have to repeat the thing each thing for each number of player and take into account xp... so you can increase / decrease based on number of player and/or xp of player(s). its basically calculated at runtime when wave is about to start because its only when you know the number of players and their xp for that wave.

    also i forgot to add whether its done per wave or per spawn or per group of spawn. ill have to go back and update the data structures for that as well. but you can see it just makes it more complex and rich...

    non of the games that i reference allow players to join while a wave is in progress, joining players are made spectators for the remainder of the wave and are able to join when the wave is completed

    also since the wave is calculated just before it starts if a player leaves the wave plays out with fewer player(s) which makes it pretty hard if not impossible

    i guess one could dynamicall recalculate the wave as players join and leave and that is not a problem i guess other than performance other than what if the wave becomes easier and youve killed more than you needed to, i guess that case is not a problem. but what if there are more running around that you dont technically any longer need to kill what happens do you auto kill them or just wait for players to kill them. regardless you would not spawn anymore if you had already spawned enough to meet the wave complete.

    so i guess its another toggle to add, recalculate as player join/leave. easiest is to have method called RecalulateWave(PlayerRule[] playerRules) and pass in like an array of player player specific rules. which basically say how to scale per player...

    i guess just before start of each something like CalculateWave(PlayerRule[] playerRules) would be called by someone to calculate the wave and pass in player rules. which i still need to define...

    i'll take a stab of how to handle player count and per player xp tomorrow ok. i will adjust / add data structures and text as needed... its just like 2:30 am est and im dead tired and its a bit of a rewrite of the above plus add PlayerRule type.

    anyways i hope you are still tempted to add such functionality / addon to killer waves. then it could truely be called killer waves. cause it does everything including th kitchen sink... ;)
     
    Last edited: Oct 22, 2013
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'll take some time to digest this in a few days. Quite a monster there :)
     
  21. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    wait till i add dealing with number of characters and scale by xp of characters ;)

    it it a bit of data structures but the results are great games that dynamically scale without having to specify for each wave exact numbers.

    think td / td+fps

    sorry still have not done it, cause distracted playing with sage ;)
     
    Last edited: Oct 24, 2013
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm sorry, I'm not understanding how this is different than the repeat wave option that lets you increase the "number to spawn" with each wave repeat. Can you elaborate? Don't try and explain the whole thing at once, let's just start with the basics of what you want.
     
  23. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    the above will scale not only number, but heath, weapons, damage, skills, endurance, time between waves, etc based not only on wave number, but also on number of players and level of players for any starting wave number and number of waves and also allow for boss waves where if keeps spawning until all the bosses are killed.

    it can also scale based on the number of spawns. so even within a wave as it spawns more it becomes more difficult.

    plus all the data structures lets you really drill down and really take control how things are scaled

    so basically it lets you have more control and lets you scale more things and it can be done with very little configuration since the engine behind is doing all the math
     
    Last edited: Oct 24, 2013
  24. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi,

    Is there any way to know when an individual wave has ended? Because I am using the UFPS plugin, my best option it to LevelSettings.EndWave (); function once I know all units have been killed.
    I can get a callback when a wave starts, but not when one ends. Of course I could hook into my own code, but any way of doing this via KillerWaves?

    Adam
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No currently there is not. The reason there is not is because there's not a delay between one wave ending and another starting, so wave 1 end and wave 2 starting are really the same thing at exactly the same time. There's even a fake wave at the very end that is zero seconds for you to catch the end of your real last wave.

    Let me know if that doesn't suit your needs for some reason.
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I don't have time to do very large features right now. I think it better if we take this offline and instead of you basically writing the code, just let me know how things would work since I know how KW works inside and out. If feasible, I will find the best way to integrate some of this. No need to do it all in one fell swoop! Email me at jerotas2005@yahoo.com to discuss.
     
  27. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    its not problem.
     
  28. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi,

    Ideally it would be great if we could have a delay between waves. This is more inline with current gen games and their wave systems (Gears of War, Halo, Call of Duty Zombies). Would this be a possible addition? Then we could have a "Wave Ended" callback.

    Adam
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can already do that. Just set an "extra" timed wave between each real wave with no spawners doing anything. In this case, you would still listen to the Wave Started event of all the "extra" waves. If you want to end the fake wave early (like after the player clicks on a "ready" button), call LevelSettings.EndWave().
     
  30. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi,

    Ok thanks ill give this a go. Hopefully wont be too hard to use this system. Ill just need a generic name for the "Empty" waves so I can identify them and then work out what to display.

    Thanks!

    Adam
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Edit: now waves can be named :) Also, this system is nothing if not easy to use. I've spent a lot of time thinking about the interface and Inspectors. That doesn't mean you can learn it in 5 minutes, but it should be intuitive. If you ever have questions, I'm here to assist though :)
     
    Last edited: Oct 28, 2013
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Submitted V2.7 to the Asset Store. Awhile ago there wasn't much incentive to use World Variables, but they are now getting integrated into everything! No reason not to use them as they allow tons of customizations! Here are the changes:

    - Added KillableChildVisibility script for cases when your renderer is in a child object of Killable. That way we can get the visible and invisible events to work properly still.
    - Added "Log Events" checkbox in Killable Inspector so you can find out why collisions aren't registering when it happens.
    - Added Active Mode dropdown for Triggered Spawners. Choices are Always, Never, "World Variable in range" and "World Variable outside range".
    - Removed "Active" checkbox for Syncro Spawners. Replaced it with Active Mode dropdown the same as Triggered Spawners got above.
    - Added Wave name to Inspector. For display and identification purposes.
    - Added display of Spawner count using each wave in Level Settings Inspector.
    - Added "Wave Ended" event to Level Settings Listener.
    - Added Wave Completion Bonuses section so you can add to Score or any other World Variable when a wave is completed normally.

    So in short, World Variables ranges can now be used to:
    1) Control Prefab Pool item availabiltility to create enemy waves that progressively get more difficult.
    2) Skip waves
    3) Control whether a spawner is active or not (even triggered spawners).
    4) Also World Variables are modified by Killables dying and waves being completed.
     
    Last edited: Oct 28, 2013
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Also, I need to mention that the price will be going back up with V2.7 so I'd pick it up now rather than later. We'll may never have a $20 sale again.
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 2.7 is live! Complete your A.I. with World Variable ranges.
     
  35. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thanks for all the help, the update looks pretty good! IM using the free version atm, will stump up the cash if it all works out for me. Any plans to update the free version?
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Not for a bit. I do it every few months
     
  37. theboosted_1

    theboosted_1

    Joined:
    Aug 21, 2013
    Posts:
    21
    Hey man, I have an odd problem hoping you can help. I've got killer waves set up and its awesome. Super easy. My problem is that while I have 3 different music tracks playing with 3 different waves I have no control over volume. The music plays fine otherwise. I've tried the sliders in level wave settings and the audio source itself but no luck. Any ideas? The wave music changer script is attached to my camera with an audio listener.
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You are correct. This is a bug no one ever found until now. I've fixed it and can send you the update if you email me with your invoice#. It will also be in the next update.

    Thank you for bringing this to my attention!
     
  39. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    Hi brian,

    I have got a world variable Game_Score which has got a NGUI listener attached to it.
    Now all my prefabs are directly updating Game_Score by calling InGameWorldVariable.SetCurrentWorldVariableValue incrementing the existing value by X amount.
    But since the killable script is not attached,no one is calling ModifyPlayerStat function which in turn update the variable value in the listener.
    So how should i handle such cases?
     
  40. theboosted_1

    theboosted_1

    Joined:
    Aug 21, 2013
    Posts:
    21
    Thanks for the fast turnaround, the fix worked like a champ. I have left you a nice review on the asset store!
     
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can either call the UpdateValue method on the Listener directly or instead of calling the InGameWorldVariable method, call WorldVariableTracker.ModifyPlayerStat. That method is on the top-level "World Variables" prefab.

    However, could you explain why you're not using Killable? Maybe there's something I can add there so it's usable for you?
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thank you much!
     
  43. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    Thanks a lot Brian using WorldVariableTracker.ModifyPlayerStat is working fine.

    I am not able to use the killable script becoz at despawn i want to conditionally modify the World Variables.

    Assume a scenario of an TD type of game.If the enemy is killed by towers than on despawn it should add to Game Currency/Score,on the other hand if the enemy manages to reach the base then it should despawn subtracting from the base life variable.As of now killable script has got only one variable which will be updated on despawn.

    This is tricky to handle at killable script level,hence i wrote scripts to handle this functionality.But totally enjoying working with rest of the killer script functionalities :)
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm going to try and figure out a way to make that possible and still enable you to use Killable...will think for a bit. Probably an easy way is to let you subclass Killable and override part or all of the Update World Variables stuff. I may need to add another section for them though. Maybe multiple sections...
     
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Killer Waves V2.7.1 submitted to Asset Store. Changes are:

    - Now showing current world variable values during runtime in Inspector.
    - To be consistent, changed "Active item mode" and "Active spawner mode" both to "Active mode" in Inspectors. You will not lose any settings, this is only cosmetic.
    - Fixed bug where music volume didn't work.
    - Fixed bug where switching previously "number of repetitions" waves didn't repeat enough times when switched to Timed waves.
    - Added Wave Repeat "spawn increase" and "time increase" fields to progressively modify all repeated waves on Triggered Spawners.
    - Add non-elimination repeat options to timed spawner waves with "Timed Repeat Mode". Kept old "elimination type" as well. This allows you to use a timed wave of 2 minutes and spawn the same wave every X seconds, but only have to set up one wave regardless of whether all enemies have been despawned or not.
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Killer Waves V 2.7.1 is now live! Grab them updates!
     
  47. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    Hi Brian,

    latest update from asset store is throwing following error on start,thereby disabling entire waves :(

    WaveMusicChanger is not attached to any prefab with an AudioSource component. Music in Killer Waves LevelSettings will not play.
    UnityEngine.Debug:LogError(Object)
    WaveMusicChanger:playMusic(LevelWaveMusicSettings) (at Assets/KillerWaves/Scripts/Music/WaveMusicChanger.cs:67)
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok,
    question 1 - are you using music in your Level Settings?
    question 2 - what version of Unity are you using?
     
  49. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    question 1> :-I am not using music in level settings as ,audio is yet to be incorporated in my game.
    question 2>:-I am using Unity 4.2.0f4
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    perfect, stand by...I have repro'd the bug and should have it fixed shortly.