[Done] Recipe Complete Trigger
Posted: Thu Mar 08, 2018 5:14 pm
Hi,
Is there a trigger for on recipe complete?
Where can I go to search for all triggers?
I’d like to create a building that has 3 recipes and does the following:
Recipe 1: Plant trees (in a radius around the building.)
So you’ll have a recipe that uses seeds and each time the recipe completes it will plant the tree.
Recipe 2: Change terrain, using fertilizer (in a radius around the building.)
This recipe will take fertilizer and per completion, look at the terrain, if it’s not grass, change it to grass. (exclude water)
Recipe 3: Do both Recipes 1 & 2 at the same time.
Do both above.
I’m thinking that the easies way to do this would be to use an “On Recipe Complete” trigger if it exists.
The recipe would produce nothing itself, I’ll just use the trigger.
If there is not a on recipe complete trigger, then I’ll use a on_tick or sector scanned and perform the above.
I was thinking that the best way to handle some of the code would be to read all the terrain in a certain radius around the building into a table when you place the building. Then per recipe complete, start at the top of the table and check if it’s valid, if valid, perform action, if not, go to next. Thoughts on this?
Any inputs on how to improve this.
I think I know how to do 90% of this code and will post it once I have it.
Input appreciated.
Thanks,
Is there a trigger for on recipe complete?
Where can I go to search for all triggers?
I’d like to create a building that has 3 recipes and does the following:
Recipe 1: Plant trees (in a radius around the building.)
So you’ll have a recipe that uses seeds and each time the recipe completes it will plant the tree.
Recipe 2: Change terrain, using fertilizer (in a radius around the building.)
This recipe will take fertilizer and per completion, look at the terrain, if it’s not grass, change it to grass. (exclude water)
Recipe 3: Do both Recipes 1 & 2 at the same time.
Do both above.
I’m thinking that the easies way to do this would be to use an “On Recipe Complete” trigger if it exists.
The recipe would produce nothing itself, I’ll just use the trigger.
If there is not a on recipe complete trigger, then I’ll use a on_tick or sector scanned and perform the above.
I was thinking that the best way to handle some of the code would be to read all the terrain in a certain radius around the building into a table when you place the building. Then per recipe complete, start at the top of the table and check if it’s valid, if valid, perform action, if not, go to next. Thoughts on this?
Any inputs on how to improve this.
I think I know how to do 90% of this code and will post it once I have it.
Input appreciated.
Thanks,