Hello everybody.
This that is following is a simple guide for having a basic plant growing and being cut.
CREATE EVENT
We start in the create event with setting the variable for watering level and setting it to 0.
Here we can set the image_speed to 0 too but it can work in the step event. This will make it so that we have no animation playing and we can choose after how to make it move.
STEP EVENT
In the step event is where we take track of the plant growth. First check we need to do is if our plant is colliding with the water drop (obj_goccia in this case) and if the water level is less then 10. This value is up to what you want to make it do and can be changed.
When the plant and the drop collide we add +1 to water level and destroy the water droplet.
Then we check what is the value of the water and then change the image_index accordingly to make the plant grow.
Then when we decided that the plant has a maximum growth we check if water is equal or bigger then that number and always set the image index to the maximum growth value.
At this stage the plant can be cut and we do so when it is colliding with the slash. It will create a seed if cut at water level 5.
Last but not least we check if water is minus 0 and then we set it back to 0 so that the plant dosen't go too below and can be grown again after the cut.
The collision with obj_slash set back the water level of the plant by -1, though it has more then one frame so a cutting action will probably deplete all the plant water in one go.
The collision with the Oil tree disrupts the plant but that is not too relevant to the whole process.
Following theres a bit of fast paced gardening 馃尶馃殰