Search Unity

[Released] 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,052
    Ok, I'm back from my "vacation" (insert laugh track here) and we are now available for same day support as usual. Carry on!
     
  2. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    391
    Thanks for your answer and welcome back to the forum. Sorry for all the time taken to read this post

    SUPPORT OF RAYCAST WEAPONS?

    Well, I myself can´t in any way code it as I do not know about coding, and I have told someone that knows about it, but told that he would need 2 days of paid works ONLY to first understand how Core Game Kit works, and then tell me what is needed to be done for this to be compatible with Ray weapons.

    Sorry that I do not understand how is possible that such awesome and amazing product like this that have so many features and is well done, misses and looses when refering to Ray weapons, why have it been made that this is only thought for projectile weapons?

    I do not think that this is a fancy or unusual feature, and not something that is not normal, as there are already many weapons that do no use projectiles on the unity asset store.

    PLAYER WITH MULTIPLE WEAPONS AND SWITCH BETWEEN THEM?

    Well as I do not know how to code then it will not be possible to do by coding, so maybe I can do what you say about the custom events for each weapon.

    DESTROYING A STILL WALL INSTEAD OF AN ENEMY?

    What I mean with making a wall "killable" was that instead of an enemy is in the way that you must kill, there is a wall that you need to destroy, and this would be by collision of the projectile on the wall, so there would be a collision happening.

    I think that instead of trying to see if it works, I will let it out, as the same as you that I understand of course that are busy and do not want that you spend time on this, I also do not have time to test and arrange and customize the scene to test if it woks or not, so does not matter, and the reason that makes it more to avoid do it is that there is the DestroyIT asset in that is able to destroy still things with either projectile or ray weapons, so I may use this one instead for walls or obstacles.

    MAKE A NEW SIMPLE DEMO SCENE IN 3D INSTEAD OF THE OLD 2D ONE?

    Sorry to say that I do not understand how is possible that such innovative, useful, helpful, and very well done asset that is Core Game Kit that surely belongs in features well to the 21st century, has such a poor, simple and bad 2D demo that seems to belong to 1980 when there was only plain 2D top down shooters. I feel that such a great product deserves to have a better demo scene in 3D to show how it works and it is let down and looses when having this poor 2D scene that feel to travel back in time to the very first games in 1980

    I do not mean in any way that you make a whole new complex demo in 3D, just a very simple thing
    done maybe with the default free character of your choice of Unity assets shooting, or any other simple thing that can fire at enemy, and the enemy can be simple things.

    Even maybe to avoid some of the work, you could also use one of the already available demos that Unity have already made and convert it to using Core Game Kit instead of the scripts, although maybe this is not such a good idea, because the time you save from building the scene, may be lost for removing the code already available and replacing it with Core Game Kit, or you could use a scene where there is no shooting and add shooting.

    Although after reading the last part that you are going to have twins, I may understand that you do not have much time to dedicate for this, and I send you my best wishes for your new born twins and my congratulations.

    Sorry for all the time taken to read this post

    Thanks very much for all the great support and for your help

    I wish you the best for you and your whole family
     
    Last edited: Aug 9, 2015
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Well, Core GameKit does not have *weapons* as a feature at all. Just Killables. If we were to add raycasts, we'd need to officially support projectile / player / enemy movement scripts, aiming and lots of other things, which are not part of the product. We recommend using Behavior Designer, UScript or other Visual Scripting package if you don't code to handle this sort of thing.

    You can destroy walls fine as long as they have RigidBody, collider and Killable component.

    As I said, we will have a proper 3D example scene at a later time, but it's lower priority (meaning requested less often than things ahead of it on the roadmap). Truthfully, that is not needed for learning the concepts of the plugin though.

    Thank you for voicing your concerns, they are appreciated!
     
  4. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    331
    Hey there!

    I am currently building a scene with soap bubbles made out of particles.

    This is what happens:
    VIDEO: https://www.dropbox.com/s/oe7u1vjlpsw6akx/bubbles.mov?dl=0

    - There will be 10 or 15 bubbles of each color x 7 (ROY G BIV)
    - Each bubble needs to spawn and float and have a random movement
    - Each bubble could be popped
    - Each set of colored bubbles has a switch that one could turn on or off. So you could have all 7 colors, or any combination.
    - There should be one bubble spawned per some time variable and when they go off screen they should die either by time or whatever and respawn from spawn location.
    - Keep track of how many bubbles have been popped

    Do you know if Core Gamekit could work?

    My particle system works, but it almost feels like it isn't intended to do what I am trying to do.

    Any help would be appreciated.


    Thanks
    German
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Yes, that sounds like a good use of Core GameKit features. The only things you'd need to code (or use a visual scripting plugin for) are the random movement and the turn on / off part. The rest can be done with Core GameKit features.
     
  6. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    Is there a way to limit the number of "clicks" in the ClickToKillOrDamage script?
    I mean is it possible to make some sort of a "click cooldown" effect? So that the "click count" replenishes over given time?

    This asset is awesome btw, saved me a lot of time for a project I'm working on.
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Just use the Retrigger Limit Mode of the Killable script. It can restrict hits based on frames or time since the last hit.
     
  8. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    Many thanks!!!! :)
     
    jerotas likes this.
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    No problem Xenonus!
     
  10. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    250
    Hi,

    I just started using this system. I will be using it for enemies in a 3rd person rpg, there is no reason why this should be a problem I assume - correct?

    What I am trying to do is to spawn some creatures at a certain position when the player walks through a trigger (which is located on another position).

    This seems to be working with the Triggered Spawner and a wave offset to match the target spawn location.

    However this does not seem to work together with randomization, at least not the way I want to. If I use Spawner Position and Wave Offset, then the creatures spawn at the target. If I then include randomization they spawn randomly around the Spawner Position but ignore the offset it seems.

    If I set the position to Custom and do not use spawner offset. Then the randomization works as desired. But if that is the onlys solution it would be nice if the custom postion could be float and not int, also if we were able to attach a transform as spawn position (or if the custom position could be taken somehow from a linked transform) that would be nice.

    Am I using the system wrong, is there a smarter way to do it? What I am going for is enemies spawning in certain rooms when the player gets close (walks through a trigger). I saw the example with custom events, and just now thought that it might be a better way to do it for this? (using the custom event and a trigger with a custom script to fire this event) :)

    Finally I was going to ask how to fire this custom event, but a quick read through your documentaton pdf anwsered it: LevelSettings.FireCustomEvent(string customEventName, Vector3 eventOrigin);

    The documentation seems very thorough, so I guess I know what to do the next few hours! Anyway if you could point my torwards the optimal solution for spawning the way I mentioned that would be nice ;)
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Yes, Core GameKit works for all game types.

    Wave Offset is a normal Vector3 (isn't it?), so it does take floats for X/Y/Z. If you didn't know, you can also assign any number of Spawner Offsets and one will be chosen randomly.

    Yes, it may be easier to fire a custom event and have several Triggered Spawners that listen for that custom event.

    I could easily make it so that the Wave Offset still gets added to the Random position if that's desired?
    Also, if you still need the ability to "use Transform position" I could add that as well. Let me know.
    Absolutely everything is in the readme, but it's pretty long. I'm working on making that into an online website with context-sensitive help, but it will take awhile.

    We just finished doing the same for Master Audio.
     
  12. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    250
    The wave offset is indeed a normal vector3 but if I choose custom position under position settings (in sted of "Use Spawner Position") then that only accept int, and at least for me float would be more "precise" ;).

    Also I would like the option to use wave offset together with the randomization (perhaps a checkbox to toggle wether to do so or not under randomization section).

    The "Use transform position" would be nice to have under position settings, so if you did that the position would autmoatically change from use spawner position to custom position with the values of the transform would be assigned (however that would also require the custom position to be changed from 3 ints to 3 floats i guess - but I assume they are joined to a vector3 anyway).

    This i not any rush though since I think the best (or most flexible) solution for me would be the one with custom events anyway ;) so it is just on the "nice to have" list.

    I also have purchased Master Audio some time back, but have not started on audio yet, but bet you will hear from me some more then - if not before ;)

    Both systems looks very detailed and effective - they are not too heavy for mobile right?

    Best regards!
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    I'll look into those.

    Our plugins are definitely not too heavy for mobile. They were in fact designed for our mobile games.
     
    Ramsdal likes this.
  14. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    250
    Yes it is me again! ;)

    Just wanted to try out the custom event trigger. And it seems to do the job just fine.

    BUT when I add a retrigger limit (time based) to 3600 seconds it does not work as I would expect. I trigger the event from script every time i pass through the my trigger area (and do not check for any time passed since I would expect the spawner to handle it). The creatures spawn every time despite the fact that I have set the retrigger limit. The manual seems to mention it a little and as I understand it should work, am I missing something?

    I have attached an image of the spawner setup.
     

    Attached Files:

  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    This is a bug. Has been fixed for next version. If you want to make the change, find the SetupNextWave method call in TriggeredSpawners.cs and add the following lines above it.

    Code (csharp):
    1.  
    2.   if (!IsWaveValid(userDefWave, EventType.CustomEvent, false)) {
    3.        // not valid due to Retrigger Limit or something else.
    4.        continue;
    5.   }
    6.  
    7.   SetupNextWave(userDefWave, EventType.CustomEvent);
    8.  
     
    Ramsdal likes this.
  16. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    250
    Thanks that did it, I can add that if i killed the enemis that had spawned from the custom event, then no more enemies would spawn for the duration of the retrigger limit. However if I just ran back and forth through the trigger zone without killing the enemies, then more enemies would pop up.

    But thanks this fixed it ;)
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    You can fix that last part by using a Triggered Spawner to fire the Custom Event, and on the Trigger Enter wave (or whichever event type you're using), click the box in the top section that says "disable event after". However that will disable it permanently. Or you can use a Retrigger Limit on that as well. You could also add a Active Mode to this Triggered Spawner based on some World Variable that means (enemies in this area all dead). A couple possibilities for you.
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Announcement!

    Dark Tonic is now available to provide training in our Plugins Master Audio & Core GameKit. We can set up an online session or in-person depending on location of your team and other logistics. Rates depend on number of attendees. Contact us at support@darktonic.com for more details!
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Core GameKit V 3.2.6.3 has been submitted to the Asset Store. This is the hugest update since 3.0! Since we're now actively using CGK on our next game, which is 3D and will be for PC and Xbox, we're adding tons of features that we need! Changelist:

    • Upgrade note: Moved our plugins into Plugins folder to help speed up compile times in your projects! Make sure and drag the entire Assets/DarkTonic folder into Assets/Plugins before upgrading to this version!
    • Added Mechanim Behavior "MechanimStateCustomEvent" which allows you to fire a Custom Event when a Mechanim state is entered and/or exited. Just add it to the Mechanim state in the Animator window!
    • Added Sort Alpha and Collapse / Expand All buttons to Custom Events section.
    • Fixed Playmaker custom action: Master Audio Group Set Pitch now has max of 3, not 1.
    • Fixed bug: Spawned method in KillableListener got called twice on first spawn.
    • Fixed bug: Triggered Spawners ignored Retrigger Limits and Spawner Active Mode fields and always spawned waves.
    • Fixed bug: "Per Hit" Damage prefabs in Killable would not spawn Damage Prefabs when invincible.
    • Fixed bug: No longer spawning damage prefab when getting hit while invincible on Killables.
    • Added Spawned and Despawned events to TriggeredSpawnerListener.
    • Added "Invincible after damaged" for X seconds option to Killable. This will make the Retrigger Limit section usually not needed.
    • Removed "Explosion Prefab" from Killable top section. This was not needed as it does the same thing (but far less options) as the Death Prefab feature.
    • Removed "Retrigger Limit Mode" from Killable. Use "Invincible after damaged" feature instead.
    • Added IsDead property to Killable. Other non-CGK scripts may want to know whether the Killable is dead (doing death animation etc) to stop their effects.
    • Added all Killable Listener methods as virtual methods to Killable class. Now you may never need to use a Killable Listener if you create Killable subclasses.
    • Added "Deal Damage Prefab" section to Killable for specifying a prefab to show for each Killable you damage.
    • Wave Offset is now applied on top of Random Positioning for both spawner types.
    • Custom Position X/Y/Z on spawners is now float, not int, for more precise positioning. Note that any values you had before will be reset to zero.
    • "Use Spawner Position" renamed to "Spawner Position" in Position Mode for spawners.
    • Added 3rd Position Mode to spawners: Other Object Position. This lets you drag in another game object and use its position to spawn.
    • Added option to pause Global Waves at end of each Global Wave. This way you can show a message or whatever and unpause the Global Waves when ready to proceed.
    • Added DestroyImmediately method to Killable, which ignores the DeathDelay. Updated Playmaker custom action "Core GameKit Killable Destroy" for this as well.
    • Added "Valid Receivers" dropdown to Custom Events. Choices are All, Random & Closest. For Random & Closest you get to specify a number. That way you can say the closest 3 or a random 1 Receiver will receive the event only.
    • Added "Vanish prefab" settings in Death & Despawn Triggers section of Killable. This prefab will be spawned if the Killable despawns without being "killed".
    • Added "Invince Hit prefab" settings in Invincibility section of Killable. This prefab will be spawned if the Killable gets hit while Invincible.
    • Renamed method "SpawnDamagePrefab" to "SpawnPrefab" since it was used by more than just Damage Prefabs. If you had a subclass of Killable and were overriding this method, you will need to change the method name to match.
    • No longer allow selection of 0 items in Pool Boss during runtime since you lose your selection if you do that.
    • Added "game status panel" section on Level Settings game object during runtime. Shows status of "game over" (or not), current level and wave, whether global waves are paused, and buttons to pause/unpause/end wave.
    • Syncro / Triggered Spawners and Killable now show at top whether they are active based on wave pause and "game over" status as well.
    • Added prominent red box saying "Despawned and inactive" at top of Killable and Triggered Spawner components while they are despawned in Pool Boss.
    • Now have a "visualized wave item" eye icon in the Hierarchy for each item shown under spawners in edit mode for visualization purposes.
    • Added TextMeshPro package for displaying World Variable values with no code!
    • Added new method CreateNewPoolItem to dynamically (via code) create new Pool Boss items at runtime, including creating new category.
     
    Ramsdal likes this.
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    And the update is already live! Way to go Asset Store team, that was fast!
     
  21. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    297
    Hey I just bought your asset and there's something I want to ask :)

    I haven't get the chance to use it yet, but is there's a way to create multiple hit points for one gameobject?
    Lets say I have a ship that can only be shot on its doors, hitting anywhere else wouldn't do anything.
    After I have shot the doors down, only then will the ship destroys itself.

    I've created a a script previously that functions almost exactly like the killable script from what I can see in the video, so I want to know whether this is feasible.
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Kind of. Check out the Composite Killables example scene. That has a sub-game object with another Killable. You can make it so that you have to destroy the doors first, and then one more hit will destroy the ship. If you want to automatically destroy the ship, you'd need to subclass the Killable or use a KillableListener to accomplish that.
     
  23. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    221
    Will soon be using this for a 3D space shooter game. Wondering what's the best way (overview) to work across network using UNet. If you're already thinking about putting that on the roadmap, would it be a good idea to just code for single player now and wait for the update, or hook into the code and create my own network instantiation routines, over-riding the core kit?

    I'm thinking: pooling for client-side objects that don't need constantly updated position/rotation across network (fast projectiles). Network instantiation for spawning things such as ships where local player controls movement, other players get the UNet instantiated clones. Enemy ships spawn and are controlled via Core Kit only on the host computer. (Core Kit disabled on client pcs, so only host PC runs the spawning and AI). The tricky part I believe is how to trade off the parameters to another host if/when original host leaves game.

    Any good input/ideas on best way to go about this? I really want to use this kit to control the enemy wave spawning, loot spawning, random objects, explosions, etc., over network.
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    We haven't used UNET but working with any plugin like that is similar. We're currently using Photon and trying to get CGK working. Photon has a new way to hook up pooling (Pool Boss) but I don't know if UNET has a way to do that. It may only want to Instantiate and Destroy, which is the first problem you'll need to work around.

    Aside from that, we try to spawn and despawn all CGK game objects on the main client only and have Killables only do damage on the main client as well.

    Fast projectiles we don't really have an answer for right now, but we're working on the same thing.

    I think most of what you said is correct. I'm not really any good at making multiplayer games though.
    It may be a few months minimum before we push any networking updates out, and it will probably be Photon only. So I'm not sure if you should wait. Maybe you should try to roll your own so you don't need to wait around for something that only goes part way.
     
    danreid70 likes this.
  25. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Hi, is there an option to spawn more AI if your FPS is over a certain rate? (eg.. FPS is between 25 > 40 - spawn 10 AI, or FPS is over 50, spawn 20 AI)
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    No, that's something you would need to code yourself, possibly by setting a World Variable based on FPS and using the World Variable for "number to spawn".
     
  27. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Ok thanks, just didn't want to spend time on it, if it was already there.
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    No problem.
     
  29. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Sorry, another question. Is there a way to spawn in AI based on the players distance from the spawner. For example; if player is less than 5 clicks away, start spawning.. then when player is greater than 5 clicks away, remove all AI from a specific spawner?
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Yes.
    Use a Triggered Spawner with trigger enter event (set up a trigger first), then there's a checkbox in the wave setting to "stop on trigger exit".
     
    julianr likes this.
  31. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Ah yes, thought about a Trigger. I think it will have to do - I will need to setup triggers on 4 possible locations (street intersection). It will probably be less costly than setting up a raycast for distance checking.

    edit: actually I think one large trigger covering the whole area will probably do it, and just setup waves based on other criteria.

    Thanks for your help.
     
    Last edited: Oct 19, 2015
    jerotas likes this.
  32. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Hi @jerotas - On trigger enter spawns the AI from the prefab pool. However, I'm having an issue with removing the AI after trigger exit, using the prefab pool. I've also tried adding a Despawned event but that doesn't remove them after I exit the trigger. Any idea where I'm going wrong?
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    You're going to have to explain more what you're trying to do. I also don't understand what "a.i." has to do with any of this...
     
  34. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Ok, I'm spawning in some zombies, after entering a trigger, on exiting the trigger I'm trying to remove them. Spawning them in is fine, its removing them that has me stumped.

    Setting the checkbox [stop on trigger exit] will just stop any more spawning, correct? How can I remove the prefabs that have been spawned if I don't kill them when exiting the trigger, do I need to create custom code for this, or is it as simple as specifying an [on trigger exit event] with gamekit then removing them?
     
    Last edited: Oct 20, 2015
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Yes, you'll need to create code for this. I would subclass the TriggeredSpawner class and override the SpawnWaveItem method so you can store each item in a List for later despawning.
     
    julianr likes this.
  36. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Couldn't I just Despawn a pool [by name] like you can in the editor at runtime? Is there an API or call for this?
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    You can do that if the following are true:

    1) You are spawning only a single prefab from this spawner (not using Prefab Pools for a mix of prefabs).
    2) You don't have other instances of that prefab that are active in the Scene from any other reason (other spawner, etc). Or you don't mind despawning all of them anyway.

    Yes, there is an API call to either kill all of prefab or despawn all of prefab (kill will fire the death prefab code on Killables). Check the API website or Intelli-sense for exact usage, but I believe they are static methods on the PoolBoss class.
     
    julianr likes this.
  38. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Thanks for your help, @jerotas appreciated.
     
    jerotas likes this.
  39. jack021457

    jack021457

    Joined:
    Mar 18, 2015
    Posts:
    18
    Hi @jerotas , I encountered a problem when I added a gameobject killable is sub gameobject, and when the gameobject is Despawned. Mount the killable entire gameobject are gone, including meshfiler and meshrenderer. Once again, when it only spawned this gameobject the parent gameobject. This is how it is, is there any way to solve it.thanks a lot
     

    Attached Files:

    • 111.png
      111.png
      File size:
      80 KB
      Views:
      481
    • 222.png
      222.png
      File size:
      2.4 KB
      Views:
      405
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Sorry I don't understand the question. Please say another way?
     
    Ramsdal likes this.
  41. jack021457

    jack021457

    Joined:
    Mar 18, 2015
    Posts:
    18
    Sorry @jerotas , My english was not good.
    1, I create a Empty gameobject and named "enemy"
    2, put a enemy model in this gameobject make it a "enemy" sub gameobject and called it "enemy_model".
    3, add script "killable" and "MykillableListener" on "enemy_model".
    4, Use "poolboss" spawn "enemy" gameobject.
    5, when "enemy" was killed. it would be despawned. at this time "enemy_model" was Destroy(I wasn't destroy by myself),I need "enemy_model" keep stay in "enemy".
     

    Attached Files:

    • 333.png
      333.png
      File size:
      10.9 KB
      Views:
      437
    • 444.png
      444.png
      File size:
      88.9 KB
      Views:
      437
  42. c6u2

    c6u2

    Joined:
    Nov 15, 2013
    Posts:
    25
    How can I control the spawn or wave by own condition? Just like the:
    1. If the game time passed 5 minute.
    2. If the player clicked the button"pass".
    3. If the variable "current wave" is 3.

    I tried the spawner 's active mode use the "If the world variable in range",but I can't control the spawner...
    Plz help me,thank you very much indeed.
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    Thanks. Better, but I'm still not clear.

    1) What are you using the Killable Listener for? What's the Listener supposed to do?
    2) Is "enemy" a Killable too?

    I don't understand #5...what happens that you aren't expecting?
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    A Syncro Spawner will, ONLY at the time each wave is supposed to start spawning, check the value of the World Variable to see if it's in range. The wave will not spawn if not.

    Is that not working for you? It has worked in our tests.
     
  45. c6u2

    c6u2

    Joined:
    Nov 15, 2013
    Posts:
    25
    1.jpg 2.jpg

    You see 1.img is the setting ,and 2.img is changed the variable at running, but the wave 1/1 have not been activated. What the reason?Or my setting is fault?
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    You'd need to show me your setup for Global Wave 1-1. I assume that it starts immediately. After that, changing the variable will have no effect.

    You need to change the variable BEFORE level 1-1 begins.
     
  47. c6u2

    c6u2

    Joined:
    Nov 15, 2013
    Posts:
    25
    3.jpg
    Global Wave 1-1 setting is the default. I do not know how to pause the wave wait for the variable changed.
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,052
    If you have "auto-start waves" turned on in the top section (the default), this will not work. This is not how Active Mode is used at all. Wave 1 will start immediately and find all spawners configured to spawn wave 1-1. Then each spawner will check if it's active based on the value of the World Variable. In this case, your spawner will not be active.

    I think you should just use a Triggered Spawner and "Fire Custom Event" with no need for a World Variable.
     
  49. c6u2

    c6u2

    Joined:
    Nov 15, 2013
    Posts:
    25
    Yeah I've been think about the Triggered Spawner,but I want to use timer to control the spawn and also use my own condition like the game is start,and when the timer reach 1 minutes then let the spawn activate,and also there is a UIbutton for skip, if player click it the spawn also will activate.
    The Syncro Spawner is more suitable for timer control and In inspector the scene designer can setup it easily,but I don't know how to control for my own condition let the spawn activate at once or wait for some event. If I use Triggered Spawner,I can control spawn use custom event or use code,but I must code some controller like timer controller for spawn to active.
     
  50. c6u2

    c6u2

    Joined:
    Nov 15, 2013
    Posts:
    25
    If I have "auto-start waves" turn off, Is that way to let the wave start ?