edited August 2015 in ORK Support
I am not able to reproduce this problem all the time. Every so often it'll happen.

Greetings, I have a strange situation using Combatant Spawners and their Respawn function.

I have a parent object with an event that successfully disable my child object which contains the combatant spawner + Real Time Battle Area....after a certain time + player proximity the event can reactivate the child object to spawn more enemies. This works fine.

The problem is if I do not Enable the Respawn function in Combatant Spawner, once the object is re-enabled it does not spawn any enemies.

If I enable the Respawn function it will respawn my enemies as expected however it'll spawn an extra one after the timer is up from the initial kill.

This causes problems because I am using float variables per enemy death to eventually disabled the child object+its components. If I add one enemy it can disable my object too soon. I also have a special combat menu that is required so by disabling the object too soon, my players lose the combat menu during combat.

To test this I am:

Combatant Spawner with Respawn 60 seconds.

Going into my event area, killing the 2 enemies that spawn. This properly disables my object and after 30 seconds the object is re-enabled. Once I walk into the area again it spawns my 2 enemies as expected but also a 3rd enemy 10-15 seconds later. If I wait 10 seconds more, it'll spawn a 4th enemy.

This I can only see it coming from the Respawn of the first 2 enemies killed.


Is there a way to have components 'reset' when they area disabled + reactivated or simply a way to Check If Enemy Combatant is still alive?


Post edited by artainx on
ORK user since 2014. Patron since 2018.
  • edited July 2015
    add your variable to the conditions section of the spawner itll probably work better that way
    Post edited by wtyson on
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • edited July 2015
    Instead of on the Combatant Death settings? If you mean the Float variable, it won't change much as my event that does all this checks for a certain Float value to disable the child object. Placing the float variable on the combatant spawner will do the same should a 3rd enemy spawn.
    Post edited by artainx on
    ORK user since 2014. Patron since 2018.
  • Its as if the respawn timer continues even if the object is disabled.



    ORK user since 2014. Patron since 2018.
  • Well, the spawners aren't really meant for being enabled/disabled at your choice - will look into allowing that :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2015
    Ahh that explains it ☺ thank you
    Post edited by artainx on
    ORK user since 2014. Patron since 2018.
  • edited July 2015
    Hi GiL, I'm just doing a follow-up on this function, if you've found a way to have combatant Spawner reset when they are reactivated.

    By reset I mean keep the settings already assigned to it and just restart. Primarily for the respawn timer as I'm using variables to calculate enemy deaths and disabled the object for X time once it's done. And the respawn timer continues even if object is disabled.

    Afterwards the object reactivates. I'm using a custom combat menu and I need to disable the objects after Combat to allow access to main menu.

    Perhaps if I setup the combatant Spawner and real time battle area object as a prefab I can delete it after my event and respawn it in game? I will try this tonight.

    Thanks for taking time to read this!
    Post edited by artainx on
    ORK user since 2014. Patron since 2018.
  • Did you test this since ORK 2.5.2?
    There's been a small internal change (doing remembering the spawned combatants on destroy instead of on disable) that might help there - I wasn't able to recreate that behaviour.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • No I haven't tried on 2.5.2 I was on other things.

    I will try tonight
    ORK user since 2014. Patron since 2018.
  • edited July 2015
    Tested on 2.5.2

    Sadly disabling the combatant spawner object and reactivating it later still causes the respawn timer to continue even when disabled.

    Ex: Respawn timer set to 60s

    It takes 20 secs to kill enemy - once dead object is disabled.
    Wait 10 sec object is renabled
    Player gets in range and triggers Enemy Spawn so the enemy is spawned back as expected.
    If I wait another 30 sec without killing enemy a 2nd one spawns which is from the respawn timer 60s.

    I tried to make my objects into prefabs - deleting the prefab and spawning it again through the event system instead of disabling it- Doesn't work, I can destroy the prefab but when want to spawn in on my parent object it doesn't spawn. (Parent object doesn't get destroyed nor deactivated.

    I added Combatant Spawner to actor list too - nothing, just doesnt respawn the prefab.
    Post edited by artainx on
    ORK user since 2014. Patron since 2018.
  • What start type are you using?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Trigger enter
    ORK user since 2014. Patron since 2018.
  • Ok, seems like starting again (e.g. through trigger enter) doesn't care for running respawn times :)
    Will fix that in the next update.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2015
    Great news! Made my day!
    Post edited by artainx on
    ORK user since 2014. Patron since 2018.
  • The latest ORK 2.5.3 fixes the continuing respawn timer problem even if the object is disabled. - Many thanks!

    The issue now is that when I return into the RTB area later - the enemies don't spawn until the respawn timer is done. The respawn timer only starts once I get back in the area.

    Eg: 60 sec respawn timer...I go back into the Real Time Battle area and nothing happens for 60s. After the respawn timer is up then enemies respawn.


    I have tried not using the respawn timer on Combatant Spawner however they simply do not respawn once the object is re-enabled.

    I'm trying to find a way to have the Combatant Spawner completely restart once it's game object is reactivated. So once i'm in range and the object is reactivated - the enemies respawn.

    Any suggestions or tips greatly appreciated - I have Makinom if that helps any..I don't know how to use it yet though.
    ORK user since 2014. Patron since 2018.
  • I'd guess that it's up to your start type. If you're not respawning, the combatants will only spawn if triggered through the start type (e.g. trigger enter).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.