Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable player with conditional entries not working #1685

Open
worldpeace-germany opened this issue Feb 21, 2023 · 0 comments
Open

variable player with conditional entries not working #1685

worldpeace-germany opened this issue Feb 21, 2023 · 0 comments

Comments

@worldpeace-germany
Copy link
Contributor

Hello,

this is in reference to this dicussion

In summary if you have a variable player like this

variable_player:
  s_pop_bumper_1_active:
    score: 100
  s_target_red_1_active:
    score: 1000
    potato: 1
  s_target_red_1_active{current_player.status_target_light_red_0 == 0}: 
      status_target_light_red_0:
        int: 1       
        action: set     
  s_target_red_1_active{current_player.status_target_light_red_0 == 1}: 
      status_target_light_red_0:
        int: 0
        action: set 

you can see in the log

EventManager: Event: ======'player_status_target_light_red_0'====== Args={'value': 1, 'prev_value': 0, 'change': 1, 'player_num': 1}
EventManager: Event: ======'player_status_target_light_red_0'====== Args={'value': 0, 'prev_value': 1, 'change': -1, 'player_num': 1}

that for each event both variable player entries are being executed. If you swap the order in the config, the order in the log changes. Thus it shows that the last entry in the config wins. The system behaves as if the condition given in {} is completely ignored or always evaluated to true.

The Q&A discussion linked above shows

  • for event player, the above is working fine, only variable player has that issue
  • a fully virtual example is attached to the Q&A

If someone provides some "getting started" where I can find the relevant code I am will to try to debug and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant