[SVO] How do I check how many treeable affs I currently have?

I'm trying to write some tree logic.  I know what I want to do, but I need to be able to check how many treeable affs I have.

Could someone give me an example of how to write tree logic for touching tree when you have two or more treeable affs?
[2:41:24 AM] Kenway: I bet you smell like evergreen trees and you could wrestle boreal mammals but they'd rather just cuddle you

Comments

  • KlendathuKlendathu Eye of the Storm
    You need to RTFM!

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • He still needs a number to do, like if treeAffs() > 2 then for the touch tree events.

    Replace the aff names here with so's 
    
    
    function treeAffs()
      local c = 0
    
      if aff.addiction then c = c + 1 end
      if aff.agoraphobia then c = c + 1 end
      if aff.anorexia then c = c + 1 end
      if aff.asthma then c = c + 1 end
      if aff.carm then c = c + 1 end
      if aff.claustrophobia then c = c + 1 end
      if aff.cleg then c = c + 1 end
      if aff.clumsiness then c = c + 1 end
      if aff.confusion then c = c + 1 end
      if aff.brokenrightleg then c = c + 1 end
      if aff.darkshade then c = c + 1 end
      if aff.dissonance then c = c + 1 end
      if aff.dizziness then c = c + 1 end
      if aff.epilepsy then c = c + 1 end
      if aff.generosity then c = c + 1 end
      if aff.haemophilia then c = c + 1 end
      if aff.hallucinations then c = c + 1 end
      if aff.healthleech then c = c + 1 end
      if aff.hypersomnia then c = c + 1 end
      if aff.hypochondria then c = c + 1 end
      if aff.impatience then c = c + 1 end
      if aff.lethargy then c = c + 1 end
      if aff.loneliness then c = c + 1 end
      if aff.lovers then c = c + 1 end
      if aff.justice then c = c + 1 end
      if aff.manaleech then c = c + 1 end
      if aff.masochism then c = c + 1 end
      if aff.nausea then c = c + 1 end
      if aff.pacified then c = c + 1 end
      if aff.paranoia then c = c + 1 end
      if aff.peace then c = c + 1 end
      if aff.recklessness then c = c + 1 end
      if aff.scytherus then c = c + 1 end
      if aff.sensitivity then c = c + 1 end
      if aff.shivering then c = c + 1 end
      if aff.shyness then c = c + 1 end
      if aff.slickness then c = c + 1 end
      if aff.stupidity then c = c + 1 end
      if aff.weariness then c = c + 1 end
      if aff.vertigo then c = c + 1 end
    
      return c
    end
  • KlendathuKlendathu Eye of the Storm
    Ah, but reading the manual tells you to go into the svo scripts folder, where you can find out things like:

    if #svo.gettreeableaffs() >= 2 then

    saving you the need to write a big long list out.

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • Klendathu said:
    Ah, but reading the manual tells you to go into the svo scripts folder, where you can find out things like:

    if #svo.gettreeableaffs() >= 2 then

    saving you the need to write a big long list out.
    Ooooo! Thanks!

    Also, it's not a matter of not reading the manual. It's a matter of not knowing how to use the information in it. You can give anyone a manual chemical engineering, but that doesn't mean they understand anything in it!
    [2:41:24 AM] Kenway: I bet you smell like evergreen trees and you could wrestle boreal mammals but they'd rather just cuddle you
Sign In or Register to comment.