#help my bees don't know how to bee

7 messages · Page 1 of 1 (latest)

fringe scarab
#

I've been working on a flower and bee system where flowers have a needbee variable. When needbee = true, a bee should find an available flower, hover over it for 600 steps (tracked by the bee's step variable, which increases on collision), then set needbee to false, reset the flower's age to 500, and find a new target.

The issue is that all bees target the same flower, causing visual and logical problems. I need a system where each bee picks an unoccupied flower with needbee = true, stays for 600 steps, then moves on. If no flowers need bees, they should revert to random movement.

I've been stuck on this for five hours, and this is just a small part of the game. My variable names are inconsistent, and I'm still learning coding, so any help making this efficient would be appreciated.

Also, I will have different types of flowers, but in the create event of every instance, I have a tag variable to differentiate them. For example, a flower has tag = "flower", the player has tag = "player", and so on.

i have the code already (where bees just target the same flowers together), but some ppl on reddit said that its kinda dumb , so i dont know if its well enough to keep it

my code is messy and annoying to read , but i have been struggling with this for a while now , any help would be nice!

limber cipher
# fringe scarab I've been working on a flower and bee system where flowers have a needbee variab...

just based on what you have written a way you could try to make this work is by making an "occupied" variable for the flowers, then write something like

if(flower.isOccupied == false)
{
  goToFlower();
}

and to let the flower know that it is now occupied you could say something like

if(place_meeting(x,y,Bee))
{
  isOccupied = true;
}
else
{
  isOccupied = false;
}

Though I don't know how all of your objects will work together, so this may be hard to implement. It shouldn't be too rough though

fringe scarab
#

Hey , i tried it with that many times before , but sadly the with function was not a good choice , i just gave up on this system

#

But yeah , thats what i tried

limber cipher
fringe scarab
#

Thanks