title: Can anyone fix my code? patch risk and switches
body: <p>For my final year project I am trying to simulate how differing opinions can impact risk and overall HIV transmission. The part I have a problem with is a fairly simple code so I have each turtle with a different risk level 0-1, as well as educators with risk of 0, and misinformation spreaders with a risk of 1, then when they land on a patch they change to the mean of the patch.
  We have added a switch to turn on and off my educators and misinfo spreaders (influencers?) as well as a chooser to swap between the mean of the patch vs the min and max. However now the simulation wont adjust and comes out with the same output no matter the adjustments.
  can anyone help me with this part of the code? I think it might just be the order it is in, or if I need to add another switch to turn mean off?</p>
  <pre><code>&quot;&quot;to be-influenced
  
      if influenced-by = &quot;mean&quot; [
        if any? other turtles-here [
          set patch-risk mean [risky] of turtles-here
          set risky patch-risk
       ]
     ]
  
      if influenced-by = &quot;max&quot; [
        if any? other turtles-here[
          set patch-risk max [risky] of turtles-here
          set risky patch-risk
       ]
     ]
  
     if influenced-by = &quot;min&quot; [
       if any? other turtles-here [
         set patch-risk min [risky] of turtles-here
         set risky patch-risk
      ]
    ]
  
     if influencers? [
       if any? other turtles-here with [influencer? = TRUE] [
         ask one-of turtles-here with [influencer? = TRUE] [
           set temptur [who] of self
           set patch-risk [risky] of turtle temptur
            ]
        set risky patch-risk 
      ]]
  </code></pre>
  <p>end&quot;&quot;</p>