This line of code feels very redundant and inefficient. Is there a better way to do this?
local favorability_variable1, favorability_variable2, favorability_variable3, favorability_variable4 = STARTING_FAVORABILITY,STARTING_FAVORABILITY,STARTING_FAVORABILITY,STARTING_FAVORABILITY`
I could do it this way but it kinda wastes 4 lines in my opinion.
local favorability_variable1 = STARTING_FAVORABILITY
local favorability_variable2 = STARTING_FAVORABILITY
local favorability_variable3 = STARTING_FAVORABILITY
local favorability_variable4 = STARTING_FAVORABILITY
-- Shorten the name
local Favor_1 = STARTING_FAVORABILITY
local Favor_2 = STARTING_FAVORABILITY
local Favor_3 = STARTING_FAVORABILITY
local Favor_4 = STARTING_FAVORABILITY
-- Use an array
local Favorabilities = {
--[[1]] STARTING_FAVORABILITY,
--[[2]] STARTING_FAVORABILITY,
--[[3]] STARTING_FAVORABILITY,
--[[4]] STARTING_FAVORABILITY
}
real question would be: Do you actually need to define 4 seperate favorabilities?
I was really just curious to see if there was a better way to define variables with the same value. Your reply was helpful though, an array is a good idea.