bbjGames's Forum Posts

  • I'm sorry, that was the wrong version. Try this capx https://drive.google.com/file/d/1TniM_Y ... sp=sharing

    You'll see that for the animals brains only one of them is randomized and the rest all stay the same

  • So I'm trying to make little critters that evolve a neural network. The simulation works good but I'm having a problem with the Arrays that make up their brains. I'm trying a for each loop to randomly pick parts of the array to mutate but for some reason it only does this to one animal instead of all 5 of them

    Here's a link to a capx https://drive.google.com/open?id=1Qtyxv ... am-mpcUCHK (the code in question is at the very bottom of the event sheet)

    I think it's something with how each works with arrays maybe? Because I tried to see if I could change all of the sprites frames using it and that works, it's only the arrays that seem to be having an issue.

  • Thank you so much, that did the trick. I was not using a local variable, instead I was referencing the sprites that were being created directly and that was not working. Now it's working perfectly

  • I have a loop and a variable called var1. On the first run of the loop I want it to spawn a piece of a road and for each run after that it should put the next piece of road starting from where the last piece went down. What I've noticed is that I can't put this all in one loop. Here's a link to the capx, you can download that to look at the code. Maybe I'm just doing something wrong (in the code to make it simple I'm just trying to put a red dot on the ends of the road that were put down in the first part of the loop).

  • No, it has a line of sight of 45 degree and a range of 40 and when it turns it has a line of sight to the unknown area next to it. For some reason if I tell it to spin when it doesn't have line of sight it spins even if it does have a line of site to it's target

  • Oh my god, I'm an idiot XD I forgot that when using atan2 you have to do the subtraction to make it into 2 variables, no wonder it wasn't working. Thank you!

  • So I'm trying to make an AI that searches around an area. I gave it the line of sight behavior and said

    If Robot has LOS to Unknown: Move forward 1 pixel

    • else: Rotate 90 degrees

    It says that else is invalid and when I try inverting the line of sight the robot just spins around in circles.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't use angle(a,b,c,d). My GPS doesn't line up with the actual points in the editor so if I use angle it won't be correct. I read that in a lot of programs there's a function called Atan2 but Construct doesn't have it and the graphics are lined up with the 0 degree position

  • So I've made a little GPS like system for my program and have AI moving from point to point based on that instead of the actual coordinate system used in the construct 2 editor. How can I find the angle of the line between two points so my bots know which way to go? (the built in angle function leads to my bots getting stuck sometimes)

    Edit: I've tried using the atan function but it only works for angles between 90 to 270

  • I noticed that when a button is pinned to an object that moves, the font size resets, is there any way to fix this besides coding in to set the font size every tick?

  • Is it possible to have a button behind objects on another layer? I noticed regardless of the layer I put it on in the layout it's always in front of everything else, is there a way to change this?

  • So I've made a drag and drop setup that works fine and where clicking and holding allows you to move and object and I'm using the On any touch end trigger to destroy the object being carried around. I'm testing it on my computer and what I've noticed is that if while I'm holding I move my mouse over a button object before letting go the On any touch end doesn't trigger. Clicking my mouse fixes it and the object being dragged is deleted. Should I use a different method? Or is this some type of bug?

  • For example 36 would be split into a 3 in the tens place and a 6 is the ones place. Is there anyway simple to do this? I figured out how to do it with while loops and stuff but I'm wondering if there's an easier way to do it

  • 614889782588491390 It seems like this might be the highest? If I increase the value, even by 1 it gets rounded back down to 614889782588491390

  • So I noticed that if a number is too big it becomes infinity but there's also a certain size where all of the digits past a certain point become 0. So what's the largest value a global variable (or any variable) can hold accurately?