-
If I want to know how many players there were last game, what method should I use? Machine variables can give me the scores but I can't do any condition against players that ain't played. Would be great if there were a machine variable for number of players last game, like I can get the scores. For example I can use to check if player 1 won or not. I ,can with the code below (and a few more events) list the order of winner, 2nd, 3rd and 4th place. This is only working in a end_game mode. But I want use the same order in attract mode to see the last scores and who won etc.
But this code down isn't working in attract mode since it only work if there were 4 players. players[0].score ain't working in attract since it's only for ongoing games. I thought I could do another condition if the player 4 did have < 0 points but that ain't working, guess it's because player 4 doesn't have any score at all and not even 0 points.
I tried with a simple test as well... but as above it doesn't work since player 4 weren't in the game and therefore doesn't have any machine variable registered for him.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is how I can get it to look in my end_game mode. I just want to get some tips how I can get it in attract mode when flipper_canceling as well. Getting the slide and everything ain't a problem, it's just the conditions I can't get to work due to num_players only working in a current game and that I don't have any alternative to use in attract. Someone must have done this before and can give me a hint. Searched the old forum and documentation but couldn't really find anything good (I probably missed it or just lack the knowledge). Cheers. |
Beta Was this translation helpful? Give feedback.
-
Add num_players to a machine variable works great. struggled a bit but that's all on me, I missed "action: add_machine" in the documenation every time I read it until I read it for a fourth time. :D |
Beta Was this translation helpful? Give feedback.
Add num_players to a machine variable works great. struggled a bit but that's all on me, I missed "action: add_machine" in the documenation every time I read it until I read it for a fourth time. :D