Posted 05 November 2013 - 09:51 PM
I have this table:
How do I change the value of 'active'? I was thinking something like:
Will this work? I'm currently at work so cannot test this, thought I would put it to the masters
Cheers in advance!
local spawn = {
creeper = {active = false, status = "off", color = colors.green, yPos = 3,},
witch = {active = false, status = "off", color = colors.red, yPos = 4,},
skeleton = {active = false, status = "off", color = colors.white, yPos = 5,},
blaze = {active = false, status = "off", color = colors.orange, yPos = 6,},
pigmen = {active = false, status = "off", color = colors.yellow, yPos = 7,},
slime = {active = false, status = "off", color = colors.lime, yPos = 8,},
chicken = {active = false, status = "off", color = colors.pink, yPos = 9,},
witch = {active = false, status = "off", color = colors.purple, yPos = 10,},
cow = {active = false, status = "off", color = colors.brown, yPos = 11,},
zombie = {active = false, status = "off", color = colors.lightGray, yPos = 12,},
}
How do I change the value of 'active'? I was thinking something like:
spawn[creeper][active] = true
Will this work? I'm currently at work so cannot test this, thought I would put it to the masters
Cheers in advance!