Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

Logic_case pick random question

Discussion in Mapping Discussion started by Super Mario, Jul 1, 2012

  1. Oct 17, 2011
    Posts
    Tis is just a question for mappers about logic_cases. Ok, so for example, I have about 6 cases in my logic case with each case that does one thing. I made the logic_case pick a random case each minute and fires one of these 6 cases. The problem is that I want the logic_case to fire one case only once. Example, after one minute of spawning, the logic_case fires case02 which was it's first random pic. I want case02 to disable and never fire again and after one minute again it picks another case until all cases are used. Sometimes, pickrandom fires the same case twice and the other cases are still not picked randomly yet. I set up a math_counter for cases to disable 6 times being used and that is why I want all of them to be used only and randomly. If anyone knows the answer to this, I would really like help please. It's simple. I just want to know how to fire 6 cases randomly and each case is fired once only. Thank you.
  2. Mar 19, 2012
    Posts
    pickrandomshuffle?
    • Like Like x 1
    • Oct 17, 2011
      Posts
      What does pickrandomshuffle means?
    • May 15, 2011
      Posts
      It means it will pick a random case from a case_logic and shuffle through them.
    • Mar 19, 2012
      Posts
      PickRandomShuffle Fires a random OnCase output with at least one connection, with no repeats until all cases have been picked, at which point the shuffle starts over.

      PROTIP: read the help info
    • Oct 17, 2011
      Posts
      So I only need to fire pickrandomshuffle once only once or do I need to do it 6 times for all these cases to fire?
    • Dec 3, 2011
      Posts
      Mario, if you want your case let do a random pick and doing the case only once per case (if i said that correct) just click on the output, then check the 'only once' option, that should do the trick.
      Check my screenshot where i made a red border is what i ment here. If i am wrong then dont mind this comment.
      Make sure its set to 'yes'.

      once
      • Like Like x 1
      • Oct 17, 2011
        Posts
        I think it fires it once only when it gets picked randomly but it still fires it randomly again. I guess pickrandomshuffle might do it. I tested before by trying to make it fireonceonly and it works for oncases itself but it still fires the same case again before the others get fired. As you see an example in mako, on extreme 2, bahamut fires electricity, fire, gravity,etc. randomly and each once only. I think this is pickrandomshuffle and I need it to be the same exact thing and I also tried to decompile Map yesterday to see how the logic_case was done and how to fire a case only once but the map had something that blocked me from seeing all the entities.anyways, thanks purpzZ. You are always helpful :razz:. I'll anyways test your prefab tomorrow and I'll see the pickrandomshuffle. Thanks jookjob also.
        Edit:Michelle, I don't want the cases to fire once per case. I made oncase01>server command>command.... And oncase01>trigger_push>enable. Same for the other 5 cases. Also, I made a logic_timer every one minute to fire a whole case randomly once each. So for example, it picks case01 and fires all it's outputs first, then next one might be case05 and it fires all it's outputs and etc until all cases are fired each once only. What you are trying to show me I think is the outputs that fire once only and not the cases.
        Super Mario, Jul 1, 2012 Last edited by Super Mario, Jul 1, 2012
      • Dec 3, 2011
        Posts
        In my case it works, i used 'fire once only' for my boss attacks to test all attacks and he fired all my attacks when need and also only once, it will re-fire randomly yes but if a case is already been fired and set on 'once only', then it will no longer re-fire that case.
        Example 2 cases both set on 'once only', and he fires case 2, then he will only fire case 1 anymore and then its done, he will stop fire cases since they both set on once only.
        If you still cant find it anyway or it still glitches then we can take a look at it together when i am back, i am of to my bed now, goodnight xxx