My garden will not grow...

shazam ham

New Member
Reaction score
0
Ok, so what i am trying to do is make it when i drop a certain plant within a region, more of that plant grows in that region.
The plants are items, can be pick up and sold. If someone can tell me how to do it that would be awesome. I've been trying to figure it out by myself and will continue to try.
Thx all :shades:

If you need more info go ahead and ask.
 

maploxy

New Member
Reaction score
0
well you could trigger it so that when you drop that item, the item is destroyed and a dummy unit is created in its place which is then added to a unitgroup. its much easier to work with units when dealing with regions. To pick it up maybe you could use another trigger that detects when a certain type of unit is a certain distance away from units in that unitgroup? when that happens, trigger it to destroy that unit and create the item in the inventory of the unit who picked it up.

To make it grow, you could create a trigger with the event 'time - periodic' so it triggers every second or so, then pick every unit in the unitgroup for the plants and do unit - set custom value to: (custom value of unit + 1) if they are in the region that allows the plant to grow. To create a delay on the grow, do an 'if, then, else' action that detects if the custom value of the units in the unitgroup is a certain value. If it is, then use the action 'create units facing angle' to duplicate the unit and set its custom value back to zero.

this means many plants can grow at a time and each has to be on the group for a certain amount of time before it grows.
 

TheOverWhelm

Member
Reaction score
16
Item is Dropped
Manipulated Item == Stuff
Reove item, place Unit PLANT

Units enters rect
Unit == PLANT
wait 10 seconds DO STUFF

It really matters what you want it to do. More then like "It will grow more!"
Because that can be done with a periodic and it can make.. A lot of plants if done right. And would lag bad.

For whatshiname's post, it'd be
Periodic 1
Pick Every unittype in Rect
Set custom value of unit to =customvalue of unit +1
if custom value of unit == 100 then
set value of unit to 0
create new plant
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top