Bioniclekolacz's Forum Posts

  • I have been watching every single YouTube video out there and I can't get my project to be an apk. I've tried numerous things with android studio and phone gap and html5 converters and just absolutely nothing is working. I've been trying to put this dang thing on my phone for 10 hours but its impossible without intel xdk.

    Is there someone who's experienced in this that could help?

  • Hi I am more familiar with java programming than I am construct 2, however I definitely love using construct 2 for game dev more than hard coding. However there have been simple things that I can't figure out how to do the equivalent of such as something like this:

    public int viewX(int angle, int distance){

    return cos(angle*distance)

    // Or just in general some sort of equation or whatever

    }

    public int viewY(int angle, int distance){

    return sign(angle*distance)

    }

    In this case its simple enough that I Can just type out the equation every time I need to reference X pixels in front of an object at a certain angle, but with this and much more it would be so much simpler to reference viewX(21,3); and viewY(21,3);

  • In loops you can use loopindex expression. If loopindex<10, set type to 0, etc.

    Or do the same with ternary operator:

    Enemy Set type to (loopindex<10 ? 0 : loopindex<15 ? 1 : 2)

    Thank you that is very helpful. Especially, I had no clue you could use the

    (loopindex<10 ? 0 : loopindex<15 ? 1 : 2)

    syntax. Is there anywhere that goes more in-depth on expressions like that you can use in places like that?

  • At the start of the layout, 20 objects of Enemy are created (one by one with a for loop). I wish there was a way to create the object with a constructor and individually set the variables. I want 10 of the Enemies instance variables "type" to be 0, 5 to be 1, and 5 to be 2.

    in java you could simply do this:

    enemy;

    for(int a=0;a<=19;a++){

    enemy = new Enemy();

    if(a<10){

    enemy.type=0;

    }else if(a<15){

    enemy.type=1;

    }else{

    enemy.type=2;

    }

    }

    However, I cannot for the life of me figure out how to do this without setting "type" to 0 1 or 2 for ALL Enemies.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not necessarily as a problem with my project, but more so on the idea side. What would be the best way to go about this:

    Say, a random amount of objects (between 8-20). [probably using a for loop], But spreading the objects apart randomly across the layout. Kind of like planets in space but none of them overlapping.

    Whats a good way to spread things out or have random generation anyways? Or should I have some other guidelines so its not quite as random?

    Any thoughts?

  • On the start of layout I have a for loop that creates objects at random locations in the map, but the problem is that a lot of times they are overlapping each other. These objects dont have any physics but I need them to be spread out at least enough that they are not overlapping one another at all. Is there a good way to do this?

  • I have a json for "random names" and right now im just testing so theyre really stupid names, and theres 7 of them. I did this by manually adding those names to an array, then saving the array, and now I put the json file in my project folder under files as "names.json", and on the start of layout with the array I "Load from json> names.json" but nothing happens, in the debug layout everything is still like the default array. I definately dont want this to be a file browser type of thing, I just want it to have that list of names as a file in the game, I dont want the users to have to download one and then use it, that would be outrageous.

    drive.google.com/file/d/13HTepcl-jm4Ww8fxUa4VS25HqDok0oaN/view

  • I'm so comfortable with construct 2 that ive been really weary about making the switch, plus theres the monthly fee rather than the one already done payment.

  • You do not have permission to view this post

  • Okay I would delete this post because I just figured out a way, but I want to keep it incase someone else has the same wondering//idea

    So what I did was On the collision of the player and the barrier, I set the vector Y to

    [Player.8Direction.VectorY-(Player.8Direction.VectorY*4)]

    And same thing respectively for Vector X.

    What this does is changes the direction of movement, it kind of makes it more of a bouncy barrier rather than just solid, but it does the job really simply. the number 4 at the end was to ensure that it canceled out the movement of the player, Any number above 2 should work, the higher it is, the bouncier.

    For example if the number at the end is 2 instead of 4, and the vector is 50, then the vector will get set to -50.

    And if it's -50 the vector will get set to 50.

    Anything under 2 for the multiplier will only slow the player down.

  • I have enemies and a player, and they both interact with solids (they don't go through them) because of the 8 direction movement behavior, but I want a barrier sprite that acts as a solid so the player can't go through until the objective variable is the same or greater than the barrier sprites objective variable.

    Initially I was going to do that just by saying -- If Objective<= barrier.objective ---> barrier>Solid>set disabled.

    BUUUUUUUT I need the enemies to be able to go through the barriers.

    I feel like the idea is simple enough that it doesn't need a capx example. But simplified I need a solid, 2 objects that interact with solids, but only one of them interacts with that specific solid.

  • idk that link takes me to a blank page with tons of random symbols like"ìÃÍÒ @jãR‚­ãŠO ³F&M¯¥jKÐ…Pw²)[àãÜøá–AÐéOAz•?ëvW™†Ö€|]Eô¿*O26•L»zÒ™;b£RbÅɨ˜¡-"

  • Sure

    drive.google.com/open

  • In hopes to keep enemies from forming an enemy herd (2+ enemies in the same spot) I'm testing if its overlapping at offset, and moving it accordingly, except, on some of them it's going the wrong direction for where it's overlapping, I believe this is because the action isn't targeting the right instance, or both, and I'm not sure how to Fix it.

    Here's what I have for one of the directions (I have all four but it would be pointless to post all 4)

    Enemy is overlapping Enemy>>

    Enemy is overlapping Enemy at offset(0,-17)>>

    --Enemy [8D movement] set Vector Y (+40)

    I want to set the vector of the Bold enemy, but I think it is targeting the one that is Bold AND the one that is underlined, OR it's just targeting the underlined one.

    Please help me figure out how to target the Bold enemy's Vector.

  • #2 and #3 are resolved>> I added the obstacles to an Obstacles to the enemy On Enemy Created>

    and changed the cell border to -1, and changed the size of the Enemy hitbox.

    I still haven't found a solution for the first problem. ~~~~~~~~HOWEVER~~~~~~~~~~~ Now I have another problem//wondering. I want to make it so that if they can't find a path to the player, they can at least go to the closest point they can, Just like they do in boxhead. Because the players will be able to place obstacles.