edited July 2017 in ORK Support
Hi Gil,

I have a Player Prefab, and two Conditional Prefabs I would like to have a third Conditional Prefab
which means another Prefab and a Variable Condition.

When I try to add this third Conditional Prefab, it fails to start, is there a limit on Conditional Prefabs ?.

Thanks
Post edited by ozziedave on
  • No, there's no limit - do you get an error message in the console?
    I did a quick test (adding 3 conditional prefabs) and could start just fine ...
    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 June 2017
    Thanks for your prompt reply, as always.

    I have tried CONDITIONAL PREFAB 2 using a variable Boolean & Float, My test has been to use a trigger to first place Armor on my Player, wait 3 seconds then take the Armor of the Player and of course I have different Player Prefabs for each of those.

    I actually have Three Player Prefabs, Player No Armor, Player with Armor and Player with Armor, but also with Amulets.

    My Player and two Conditional Prefabs 0 & 1( 0 Armor & Armor with Amulets 1). What I want to do is take the Armor off the Player, which I thought would be another Conditional Prefab 2

    But this does not work, as nothing happens when Conditional Prefab 2 is activated.

    Another test doing it the same way as the others, was to Change from Just Armor to Armor with the Amulets, that worked fine, just doesn't with the third Conditional Prefab.

    Is there a limit to Global Variables ?. Failing that my database must be corrupted.

    No Error messages at all.
    Post edited by ozziedave on
  • Your problem is most likely the order you've added the conditional prefabs. The first prefab with a matching condition will be used, i.e. if prefab 1 conditions are valid, prefab 2, etc. will not be used any more.
    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!
  • Gil, could you suggest a workaround at all ? I would really like my Player to shed his Armor.

    Cheers
  • Yeah - change the order of your conditional prefabs :)

    E.g. If you have conditions A, B and C, you should order them like this:
    - prefab 0: A+B+C
    - prefab 1: A+B
    - prefab 2: A+C
    - prefab 3: A
    - prefab 4: B
    - prefab 5: C

    Naturally, you can ignore those combinations that aren't used in your case.
    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 fixed the problem this way:

    MY PLAYER HAD TWO CONDITIONAL PREFABS

    I made an Event that made the Booland Variables Invalid

    Conditional Prefab 0 PlayerGetsArmour – bool – is valid – not ticked
    Conditional Prefab 1 PlayerNo Amulets - bool - is valid - not ticked

    That took me back to my player in street clothes.
Sign In or Register to comment.