title: How to model spawning after kill/miss in Predator-Prey model in Netlogo?
body: <p>I'm working on a <a href="http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation" rel="nofollow">Predator-Prey model</a> but I have a unique spawning mechanic that I'm trying to work in. </p>
  
  <p>The idea is that when a wolf encounters sheep, there is a probability of the sheep escaping (I already have this part coded in). If the sheep is killed, <em>n</em> number of lambs are created. If the sheep escapes, <em>k</em> number of lambs are created. After <em>t</em> periods, the lambs become prey. <em>n, k</em>, and <em>t</em> will all be sliders on the interface side. </p>
  
  <p>I'm pretty new to agent-based modeling and Netlogo coding, so any advice would be really appreciated.   </p>
  
  <p>This is the current code for the hunting:</p>
  
  <pre><code>to catch-sheep  ;; wolf procedure
      let prey one-of sheep-here   
      if prey != nobody and random 100 &lt; kill-probability 
          [ ask prey [ die ]
  </code></pre>