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
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.
Share this post
Link to post
Share on other sites