How to prevent a random event being picked twice? #39
Replies: 2 comments 1 reply
-
It looks right to me... does it makes any difference if you skip the weight on the events in select_way_out_west_2_song_integer? Mystery awards example doesn't use two random_events, it use one. If you pick both events from select_way_out_west_1_song_integer and use force_all it should work. But perhaps that destroys something else with your design due to how events are named. EDIT, I need to read better. :D You use two different "event-pools". |
Beta Was this translation helpful? Give feedback.
-
I actually ended up just having one mode that is called that picks one item and random for each of the 4 albums and writes that to a variable and then calls a second mode that uses conditionals to filter out the song that matches the variable from the first mode. I know there must be a much more elegant way to do it but it does seem to be working. Gill, I think you had posted a longer post (and then edited it down) about force_all and force_different which actually did help me understand some things about how mystery modes can work so thank you for that! |
Beta Was this translation helpful? Give feedback.
-
Greetings all, so in my pin (a music pin based on the band Lord Huron) you have to complete 8 "song" modes (2 from each of the 4 albums). But I have about 5 or 6 song modes for each album. So, I'm trying to figure out the best way to do this. I started by trying to set integers for the songs during the initial skillshot mode (when the mode starts it plays the "select_way_out_west_1_song_integer" event and then there is a second event_player entry that when "select_way_out_west_1_song_integer" is played it plays "select_way_out_west_2_song_integer") using a random event player that picks one of 5 song numbers and writes that to a variable. And then the second song integer is picked--but for some reason I every once in a while, end up with same integer being picked twice.
I tried using this code on the second integer pick to say "only give this option if the number hasn't already been picked" but it's not working:
Basically, how do i pick 2 numbers from a list of numbers and make sure that the second number picked is not the same number as the first number picked?
Or is there a better way to do this since I imagine there must be a way that mystery awards don't award the same thing twice? (like extra balls or specials or strobe multiballs, etc.)?
Beta Was this translation helpful? Give feedback.
All reactions