Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

'Growing' Script (read)

Hi There  :lol:
My Name's Shingu.
...Anyways, I'll get on with the point.

I Need a script that allows you to go to a 'Dirt' Tileset (It could just be a script that I can call using events)
and It gives me a few options like, 'Water' or 'Harvest' or 'Plant...'
When I click to water, It shows a watering animation on the tileset, then after a few minutes, It just grows to a larger plant, which you can continue to do, till you grow the biggest plant. 'Harvest' Will allow you to harvest any fruit it has on it, and when you harvest, the plant goes back into its original state. When you click 'Plant' You can plant certain seeds that you have on the designated tileset and you can slowly grow it.
^^ Thankyou
Hope this makes sense
 
LOL yet another one that can be easaly solved by common events... People now a days are trying to get lazy and have everyone make a script for them to get out of the work of actualy comeing up with something... ANYWAY not trying to flame or anything I just think it's funny.

This is by all means not the easy way to do it, BUT you can take it into your own hands and do it yourself.

Now then to slove your problem. Simply make an event that is at the same level as the hero. When the hero is facing the space and presses enter it will start the event. (easy start no?) Now make a Yes, No question come up and make the 4 options this. Plant, Water, Harvest. Now your going to have to set up veriables for every plant now but see if you can follow me. When Plant is clicked simply go into that branch and put in a message box telling you "Plant has been planted whatever whatever." Then turn a switch on. (Switch has to be diffrent for EVEROTHER plant!!!) Now then if they chose water go into that branch and put in a conditional branch. Now then if the switch for "Plant" is on (Meanning that the've planted a plant.) then say message "Whatever whatever" and set the Veriable "Water" to +1. Now for the fun part. Make a common event, (AGAIN for each plant) and make it so it dose this...

Make it a parralle prossess (DAMN MY SPELLING!!!) and make it so when the switch for "Plant" is turned on it runs.
Heres the event....

Wait (Time you want for next growth)
Conditional branch -> Is "Water" Veriable Greater or equal to (Amount of Water you want to be watered between growths)
True
    Set Veriable "Tree"  to + 1 (This will make the plant the next stage.)
False
    Turn swith "Plant off" (This will kill the plant basicly and set it back to just the soil)
    Set Water = 0 (This will make it so that they will have to rewater the plant if they plant a new one)
Set Water to = 0 (Optional! This will make it so between every growth they have to rewater it or not.)
Wait (Time you want for next growth)
Repeat

Then all you do is make an event with all of the pages that you want for stages of growth...
EX: 5 Pages... Soil, level 1, level 2, level 3, Full grown
Then just make it set up like this....
Soil = no condition
level 1 = "Plant on"
Level 2 = "Plant on + Water = 1"
Level 3 = "Plant on + Water = 2"
Tree = "Plant on + water = or > 3"

As for the fruit you can set that up as an event to. Just PM me if you can't figure the rest out. Don't get lazy though and try to come up with the solution yourself! A great game creator comes up with his own ways to make his game not others.

Hoped this helped and again if you need more help PM me.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top