title: Netlogo: choosing ranked n-of turtles to add to a certain value to a variable
body: <p>I'm constructing a model to research opinion dynamics given certain network structures. In the model, there is a hypothetical 'dictator' who can hand out resources (or 'bribes') to certain nodes in the network. What I want is that the dictator can choose the top X% of nodes in the model who have the most positive opinions. (later I also want to the dictator to choose the nodes with the most network connections)  </p>
  
  <p>What's the best way to do this? I'm not sure how to use the n-of command for a 'ranked' n-of. Or is it better to use another term I'm not aware of? </p>
  
  <pre><code>ask n-of ??? turtles [set bribes (bribes + height-of-bribe)]
  </code></pre>
  
  <p>thanks! </p>
  
  <p>edit: </p>
  
  <p>currently, I have:</p>
  
  <pre><code>foreach sublist sort-on [(- total-motivation)] nodes 0 10 ask nodes [
  set bribes (bribes + height-of-bribes)]
  </code></pre>
  
  <p>but I'm still getting errors. Any thoughts?</p>
  
  <p>Edit 2: </p>
  
  <p>Nevermind. It works. Thanks! </p>