bbjGames's Forum Posts

  • Well the issue is with multiple "cows" they all seem to move towards the same piece of grass, even when some of them shouldn't be able to see it or at least it seems that way

  • I made some animals that are supposed to go towards grass when they see it, then when they hit the grass they gain energy, reproduce and so on.

    It doesn't seem to happen for all of them but once there are a lot of animals most of them get concentrated in one area. After watching for a while I also noticed that if they moved to a different area almost all of them moved and that sometimes animals with no grass around would randomly turn a bit so I'm wondering if the issue has something do with the line of sight

    The code is

    • Animal has LOS to Grass: Animal rotate 5 degrees towards Grass.X, Grass.Y

    Am I doing something wrong?

  • I think I fixed the issue, I've been using local storage and an integer variable was being turned into a string which was causing errors

  • Ok so I tried checking the array using the console and it looks like the values just aren't being saved. I set the value of the array to A but the console displayed 0.

    Just to see if I could reproduce the error I made a program with just a textbox, array, text, and a button. When the user pushes the button the value in the textbox is put into the array and displayed on screen. This worked totally fine so there must be something else wrong with my coding although I have no idea what it is

  • Check the font size inside the text box. You might have it not set to auto, so smaller window sizes will cause the font to be too large to be displayed. You can also use the browser log action to display the asjson of the array, just to confirm that it's correct, and to display the text box.text value.

    I don't believe its the font size because instead of displaying nothing it displays 0 but I will try checking the browser log and check the rray

  • So I made a program, works fine when I test it myself but when I uploaded it to bitballoon it stopped working correctly. To double check what the problem was I made a textbox that shows one of the values in an array that the user creates and sure enough after tying in the value nothing came up so it seems like arrays aren't functioning properly when uploaded with this site. Is there anyway to fix that? I've been exporting as an HTML file and then converting it to a zip file that I upload to the site, everything else seems to work fine

  • No, I'm using numbers for both values. The exact code is

    On button clicked: Array set value at (0,0) to Array.At(0,0) + Array.At(0,1)

    I'd expect every time the button is clicked for the value to increase by whatever the value at Array.At(0,1) is but it doesn't do that

    If I turn Array.at(0,1) into a variable, A and then try

    On button clicked: Array set value at (0,0) to Array.At(0,0) + A

    The program then works

  • I noticed that if I try something like Array.At(0,0) + Array.At(0,1), I only get the value from Array.At(0,0) . If I reverse it I only get the value of Array.At(0,1). If I use something like Array.At(0,1) + 1 I have the same problem where only the first value is used and the other is ignored. I've tried putting both numbers inside parentheses but that didn't work either. What's the proper way to do this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok this project's just about done except for one little issue. I've separated the areas into warmer and colder places (equator, more temperate areas then the poles) to try and get speciation to occur. The issue I'm having is that seeds seem to be sharing DNA? Like if there's two populations of trees split up in the two temperate areas somehow the both start sprouting on the other side of the equator. Any help would be very appreciate because after this my simulation will be finished <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    https://www.dropbox.com/s/b527tfepxhuam ... .capx?dl=0

  • Well my issue is how to make it random elevation but I figured out a way to do it more or less randomly. I create rows of empty blocks then spawn a real piece of land at a random elevation. If an empty block is next to a piece of land that block will spawn a piece of land with +/- 1 elevation

  • So I want to make the terrain so some areas are taller than others, each are is made up of blocks whose height is indicated by an instance variable (1-9) But I want all areas to be accessible so I want a block with a height of 9 for example to have at least one 8 block next to it. Any idea how I could make this work?

  • Sensor's aren't always present but thanks ^-^ And I've got most of it done, I only have one issue now

    In the beginning all of the animals parts are pinned to the properly but in their offspring it looks like they're being pinned to random things. Any idea on what's going on? Here's the new capx https://www.dropbox.com/s/gga249clhmsg6 ... .capx?dl=0

    I think I may just have too much going on at once? Because in the debugger I can see it takes a while for everything to update itself

  • Looks like by setting it to

    For each sensor

    Brain.Animal = Sensor.Animal

    It works properly

  • Ok I think I've found this issue or at least part of it. I deleted everything with the food and just simply stated

    If Sensor.Animal = Brain.Animal: Destroy sensor

    For some reason thought sometimes the sensor isn't destroyed, I checked if their animal value was the same and it was so I can't imagine what the issue is

    I changed it to

    Brain.Animal = Sensor.Animal: Destroy sensor

    Now it always works unless one of the animals lacks a brain, then none of the sensors on either animal is destroyed. Why is this and how can I fix it?

  • Just a little simulation I made for fun, each tree has a few lines of code that control its traits, most mutants tend to be infertile at first but eventually you'll start to get some interesting results (feel free to post pictures of anything cool that evolves, suggestions of anything I should change, etc). Here's a link so you can run it https://googledrive.com/host/0BzCfGb4is ... W5xU1JBQVk