Page 1 of 1

Limit how often a building can be build

Posted: Sun Dec 23, 2018 4:18 pm
by Raelf
Hi all,

I‘m new here and thinking about an idea for a mod.
I want to create a super building with great benefits which for you need to spend enormous amounts of resourses.
But to make it not to much OP I would like to limitize how often it can be build.

Is this possible to do in a mod?
I could‘t find anything about that topic.

Best wishes,
Raelf

Re: Limit how often a building can be build

Posted: Sun Dec 23, 2018 8:19 pm
by MewMew
Yes,
you can do that with the on_built_entity event and a global variable that saves the amount of already built structures.
If there are too many, you can destroy it and reinsert it into the players inventory.
Maybe even print a message so they know that the limit is reached.