bbjGames's Forum Posts

  • I've been adding all the values for each sprite and dividing it by the total number of sprites, is there anyway to do that? (Ex: for each sprite add sprite.size to Globalvariable then divide by the number of sprites is what I've been doing but is there some sort of function I can use instead?)

  • Yeah although now I'm having a different issue. There are trees and bushes. Only bigger animals should be able to eat the trees so I have

    (Every 1 second, for each tree, animal is overlapping tree, animal.height is greater than 50, animal is not full)

    [Animal add 25 to food]

    This works but if an animal large enough to eat a tree is eating one then if a small animal is overlapping the tree it also starts to eat it. I know sometimes the order of conditions can affect it, do I need to change that? Or am I just missing something

  • Ok when I put for each animal before if it's overlapping the plant it worked. Thank you

  • I tried that but then it does it for every animal overlapping a plant even if it's a different one like if there's 3 plants and 5 animals on one, 3 on another and none on the third they all 7 from their food value every second (I'm using families for the animals and a single sprite for the plant if that would affect it at all)

  • So I have plants and when they're fed upon they lose food value until they disappear, the problem is I can have 5,10,20 a million animals eating them and they still only lose 1 food value per second. What I have looks like this

    Every 1 second : Plant subtract 1 from foodvalue

    Animal is overlapping plant : Animal add 10 to food

  • Ok

  • Hey looks like this is kinda dead but I'm having the same issue. I put an array in container with a sprite and try to set a variable for that sprite using the values in the array but it doesn't work

  • So how can I get the sprites to access their arrays? It doesn't seem to work

  • I'm making a simulation of an atmosphere/planet so I probably would have about 5 things I'd wanna keep track of and put down there average in the array every 10 seconds or so and if you checked recent you'd see the latest 10 kind of like that so I wouldn't need to access more than 50 values at any given time

  • So I want to keep track of the average temperature in my game and allow players to view that data whenever so every 10-30 seconds whatever I decide it will save the average temperature to the array and add a new space on the array for the next temperature. Before I get too far into it will this eventually cause lag?

  • Hmm ok I'll try that thank you

  • So if I have 10 lakes and each lake has a variable water how could I see the combined amount of how much water each lake has?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ooh that's a great idea!!! Thank you!

  • So I've been using an array to store a list of variables for sprites, is there anyway to give the sprites themselves a list instead? Or are variables only able to be single numbers?

  • Didn't even know that was a thing thanks! Hopefully it'll work!