Greetings,

Not sure if this has been answered before..... but I wonder how I can use my already placed out enemies in my scene instead of using the battle objects that spawns the enemy once I enter the trigger zone. Here I want them to be placed out at the direct positions where I have them atm at the start of the scene so my player don't need to enter the battle trigger zone. I looked a bit at the combatant spawner but wasn't sure if this is the way or I should do anything else.

I am sure you guys out here has a quick and solid answer for this.

Thanks in advance!

/T
  • edited July 2015
    add a combatant component to them an just set up everything else like you would in the inspector if you dont want to spawn them just make a combatant inside ork with allt he things needed to control them like hp , animations , move ai ect an just set up the combatant component with that enemy
    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
  • That worked very well wtyson! Thanks for the input....

    However I am experiencing one thing though.... When I win the battle then the enemy doesn't do the animate death.. So he simply stands there just as he did before I fought him, even though he should be dead lying on ground.

    It work just flawless when I am using the normal Battle.

    Any idea what might cause this wtyson?
  • Got it figured out... noticed that my goblins for some reason had slightly different name on their death animations.. so renamed them to be same as the death event
  • edited July 2015
    One thing that is weird is that I have two types of battles now... One Battle and one Add Combatant on an already placed target. If I go to the battle and kill that enemy first and then I go to the add combatant enemy which has detect movement as a starter for battle, once the battle initiates then I see the battlemenu quick come but immediately disappear again and then I am stuck in that encounter and had to click stop button since I can't do anything.

    To make things even more weird is if I do it the other way and kill the Add Combatant Enemy First and then go to the Battle then everything works as it should. So only if I come from a battle to Add Combatant, then I experience this issue
    Post edited by thrilled on
  • More issues here with this during turnbased:

    1.) At a Add Combatant fight: When I shot my fireball against the enemy it hits and detonates around 3-4 meters before the actual enemy itself. This enemy has the same box radius (1) as my player and other enemies. However when I do the fight as a battle then the spell hits the target right at the targets spot. I can't seem to understand why this is happening. I have tried to look at the enemy combantants in play mode to see if I could see any differences but I couldn't at the first look.
  • edited July 2015
    Well,

    I found out the issue for the spells hitting before they should. It was actually that I had Child as Root on one of the combatants ( the one with the problems) while the other didn't so once I removed the child as root option then it hits as it should...

    However it didn't solve the issue when doing regular battle first and then doing a add combatant battle with the missing battlemenu.

    **EDIT** Damn now I notice the same issue when I had two Add combatant battles in a row too... Grrr why is my battle menu disappearing :p
    Post edited by thrilled on
  • Did a quick test and that's not happening here.
    Send me a small Unity test project to contact@orkframework.com and I'll be able to look into it :)
    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!
  • Hmmm sent you a PM GIL...

    Hmmmm, feels like there is something weird with my end battle event... even though it looks alright.

    Here is what I have found out:

    Now when I created a battle with a combatant group of 2 goblins then I experience some weird stuff..

    1.) If the goblin kills me before I am able to kill any of them, then the simpleDefeat event works flawlessly and post the dialogue with the game over text and then brings up the menu where I can choose to return to main menu. Just as I want it.

    2.) If I instead are able to kill one of the goblins and the second one kills me, then suddenly I get weird stuff. It still posts the Game Over dialogue and when I click on the ok button and should get a menu giving me the option to return to main menu, but this never happens. I am stuck lying on the ground and can't get back to the main menu.

    If feels like the Game Over event never happens in step 2.)

    More interesting stuff regarding the disappearing battlemenu:

    After the first battle/add combatant I do regardless if it's a turnbased or realtime then the next battle gives the the weird issue with the battlemenu quickly appearing just to in about 0.1 sec fade away again. Also the enemies in the second battle/add combatant does continous attacks on my character without giving me the option to do anything (since my battlemenu isnt there). This behaviour leads me into thinking that the first fight has not actually ended fully. Another thing to support that assumption is that if I have two Add Combatant battles and do the first one and the enemy dies and I am awarded the loot then I after that are able to bring up my battlemenu whenever I want walking around in the world. So again I get the feeling that first battle never ended as it should
  • Wow - Now I think I know what was causing it.....

    It was as I though... something with not leaving the combat...

    I added a Leave Battle Node at the end of my Death Battle Event. Then everything is working alright again... This however take away a feature I would like to keep.... since choosing Leave Battle means that the users prefab will be destroyed it also means that I cannot keep the corpses on ground after battles.

    Due to this I got into the impression that it may be due to the keep prefabs that I have checked on my combatants. So I tested this by removing the Leave Battle node from my death battle event and then unchecked the Keep Prefab under the Combatant settings. Then tested the game again and now everything works again.

    So the conclusion was that the Keep Prefab on the Combatant made it behave like this.
  • Also with keep prefab not happening here ... will need a test project.
    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.