Hi

i try to start another battle in same level but battle cant start.

in first time i can do it with no problem , but when i try to start another in same or other level no battle start.

in my case , i create battle object by ork scene wizard and add game starter in same scene to test.

- i try game starter in main scene but also not work !

- i try to use scene id in battle component but also not work !!

my code to start battle is :

BattleComponent battle = GameObject.Find("Arena").GetComponent(); --> Arena is a battle component

// battle.sceneID=Random.Range(1,400); --> i try to change it but also not work :(


battle.StartGroup(egroup, null); // Work in first time , but not when restart same level.

----------------------------------
i most restart the game to play same battle :( please help .
  • If the battle has Use Scene ID enabled, it will not start again. Just disable that setting.
    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!
  • i disable that setting

    but not work :(

    when i replay it give me tow player,insted of one and battle cant start :(
  • Do you have a player clone in that scene somehow? That's happened to me sometimes when testing. I did something that left a player clone in the scene so I had two players.
  • Are both players in your player group? If that's the case, it's most likely due to the start event being played twice, e.g. once through the start event setting in the main menu settings and once being in the scene.

    If the battle doesn't start, make sure the enemy group is of an enemy faction.
    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!
  • Hi again

    i try new test project
    - i put battle object with sample player and enemy prefab without sence ID
    - i start battle automaticly.
    - i put button with this script : Application.LoadLevel(0);
    - in battle , when i press that button it cant play battle again.

    its play again just if i escape from battle only !!

    how can i start battle again every time i press that button ?
  • @Nooh post some screens of the setup like your event component ect.. this way we can assist you better. just do a step by step screen shots of how your stuff is set up.
    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
  • Hi wtyson

    this is my case:

    image



    this is setting of game starter

    image


    this is my battle object setting:

    image


    this is my battle system setting :

    image



  • also this is my battle start event:

    image

    and this is my prefab setting :

    image

    and this is the runtime ork game handler :

    image

    i think there is way to tell handler that the battle is interrupt, and i need to start again.

    something like garbage collector.

    sorry for heavy thread
  • your starting fights from another scene or same scene?
    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 September 2015
    in this example , i can replay battle only when :

    - escape
    - victory
    - defeat or die

    in my big project i must restart the ( game ) to fight again !!!
    Post edited by Nooh on
  • from same scene
  • sound to me your battle area isnt set upright then bout only thing i can think of.
    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
  • Or maybe, doing this by script it interferes somehow with Ork framework about battles, and the current battle is not considered as "unfinished".
    Could try to add an "End Battle" step event somehow? I don't know if there is an ORK related issue (with custom scene loading through script), but i never had problem in restarting battles... Try to end it before scene loading and see if it replies. :)
  • So, you're reloading the scene while still in battle? That doesn't work - the battle needs to end.

    You can either do this with the event system or calling this function from your script:
    ORK.Battle.EndBattle(BattleOutcome outcome);
    BattleOutcome is an enum that holds the different possible outcomes of a battle (e.g. defeat, victory, etc.).
    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!
  • when i press button to load level to start new fight this is the result:

    image


    Not work brothers :(

    i think it's a bug.

    i can start battle , but can't play same battle again in same place .

Sign In or Register to comment.