Hey everyone,
So I need to lock a building template that I've created from being seen/used by players. Catch is, I want it locked from everybody unless specifically unlocked by my commander profile - so I need to do it through a Code item.
Now I have been doing my best to learn from the documentation, but the sad truth is that I have no coding knowledge, and am picking this all up as I go.
SO!
The deets:
-- ---
-- ---
What I need: A specific building to be locked from gameplay until called upon.
What I've got: A mess of code possibilities that I Have no idea how to stick together. Disclaimer - even ignoring the inappropriate format, "GameApply" might not actually be a thing (or relevant). It's a guess. Though, technically, it's all a guess:
Does this look... remotely accurate? That "Test" building needs to be locked away, so I can unlock it later. If anyone has any tips, I would be eternally grateful!
So I need to lock a building template that I've created from being seen/used by players. Catch is, I want it locked from everybody unless specifically unlocked by my commander profile - so I need to do it through a Code item.
Now I have been doing my best to learn from the documentation, but the sad truth is that I have no coding knowledge, and am picking this all up as I go.
SO!
The deets:
-- ---
-- ---
What I need: A specific building to be locked from gameplay until called upon.
What I've got: A mess of code possibilities that I Have no idea how to stick together. Disclaimer - even ignoring the inappropriate format, "GameApply" might not actually be a thing (or relevant). It's a guess. Though, technically, it's all a guess:
function GameApply(self, city) LockBuilding("Test")
end
Does this look... remotely accurate? That "Test" building needs to be locked away, so I can unlock it later. If anyone has any tips, I would be eternally grateful!