Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Tomo2000

I Must Be Missing Something Simple

Question

Meddling with C++ and Java lately for university has really been screwing with my general ability to RGSS, but I digress. This is nowhere near the final version but I simply want a script where, in a script section of an event, I can initialize it and then do something like "if @citizens.isInfected == true". I'm sure I must be doing something simple wrong but I have no idea why. Thanks guys.

class Citizens
  attr_accessor   :infected
 
  def initialize
    @citizen_id = 0
    @infected = false
  end
 
  def isInfected
    if @infected == true
      return true
    else
      return false
    end
  end

  def getInfected
    @infected = true
  end
end

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...