edited February 2017 in ORK Support
In my game the majority the enemy combatants are at set levels. There for some areas you need to be a higher level to visit. I have 4 variables which are set up when loading each scene.

In my second scene the variables are set as fallows:

AreaLvls1 = 2
AreaLvls2 = 3
AreaLvls3 = 4
AreaLvls4 = 5

So when spawning combatants the set Level setting is set to variable and one of the above variables is entered but when they spawn the variables spawn combatants at the following levels:

AreaLvls1 = 2
AreaLvls2 = 4
AreaLvls3 = 4
AreaLvls4 = 6

For some reason if the number is odd then the level is set at the next even number up.

Then if I set the Set Level setting to Player and set the min offset to -1 and the max offset to -1 if the combatant level would be an odd number it sets it to the next even number down.

Has anyone else had this problem? If so how did you solve it. It is really frustrating. I have gone through every setting but I can't see that I'm missing something.

I know it's probably something I've done but I can't get to the bottom of it I have been trying for days now.

Thanks for any help, I need it.

Oh and sorry about the long post :/
Post edited by jonjaydee on
  • edited February 2017
    That's a very strange problem - I did a quick test with a similar setup and it worked fine.

    The variables might be set after the combatants spawn when both use Autostart, so you might want to add a small delay to the combatant spawners (Start After setting, e.g. 0.1).

    Did you check if the variables have the correct value? Global variables can be viewed in the inspector when selecting the _ORK game object.
    Post edited by gamingislove on
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks For looking into it Gil.

    The Variables are set when the scene is loaded ant the spawners are started with a trigger when entered and scattered around the scene.

    In the below screen shots as you can see in _ork the variables are set and the two i choose in the spawner are AreaLvls3 and AreaLvls4 which should spawn combatants at 4 & 5 but they are spawned at 4 & 6


    I'm going to try in a different test project and see what happens. I'll let you know if I solve itare there any other options you can think of that might cause this error.

    Thanks again
  • A quick update.

    My variables seem to work fine if I call the enemy combatants from a combatant group. The problem as outlined above only occurs when I set the combatants in the spawner event. So I am just going to go through all my spawners and create combatant groups fro them instead.


  • It should still work with using a single combatant in the spawner - if you could send me a small test project where this occurs to contact@orkframework.com, I'd be able to look into it :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks Gil.

    I'll create a new project and see if it happens again and if it does I'll send it to you. Currently the project the error is happening in is to large to email.

    Thanks for your help and thanks for the great work you've done with ORK definitely my best purchase of last year.
Sign In or Register to comment.