Sushin's Forum Posts

  • I don't know if you know this but you can set any block of conditions to be an "or" block instead of the default "and" block. Just right click the block (not the event) and click "set as or block" or something and if any of the events in there are true, it will do the action.

  • I actually fixed it. If anyone in the future has the same problem this is how I fixed it:

    <img src="http://puu.sh/2P2TP.png" border="0" />

  • Does anyone know the problem..?

  • It might be because it's happening so fast that one click triggers both sprite 1 and sprite 2 as it's created. I would put a short "wait" action somewhere in the process to avoid that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm having a problem where all of the lines of sight that my enemies have act uniformly. This is what they are supposed to look like:

    <img src="http://puu.sh/2OCMf.png" border="0" />

    However, the moment I walk into the line of sight of this enemy (he is the first enemy that appears in the level and it only works with him) then all of the other lines of sight follow that same behavior, and I have no idea why because all of the lines of sight are in containers with the enemies. Shown here:

    <img src="http://puu.sh/2OCOm.png" border="0" />

    Here's the code I'm using where I think the problem is occuring:

    <img src="http://puu.sh/2OCSa.png" border="0" />

    Is there something wrong with what I'm doing?

  • Oh my...I'm surprised I forgot about that. Thank you guys.

    And thanks a lot Yann for that tip.

  • I'm not really sure what the problem is with my code but it seems like there might be something wrong with the timer.

    <img src="http://puu.sh/2NQIj.png" border="0" />

    The problem is that they only seem to pick the first option. It never actually randomizes. I set it to jump and they only jump and if I set it to move right they only move right.

    What I want them to do is switch between the 4 behaviors every 2 seconds while Holding is true. Maybe I don't understand how "every x seconds" works but it seems to just be setting them all to the same thing and not doing anything every second.

  • Oh..That's weird.

    Thanks. It worked. =)

  • So I'm trying to make a dash by double tapping a key, and my code looks like this:

    <img src="http://puu.sh/2MwiB.png" border="0" />

    However, it seems to immediately set dash to true, trigger the event that says "if true and if a is pressed" and then set it back to false instantly, setting the dash effect off in the process every time the A key is pressed.

  • Ah. Thank you. That's exactly what I wanted. =)

  • Thanks. I took out the "- FootSoldier.Y" part and it works well, although the problem now is that when the player is next to the foot soldier, the crosshair is as high as it can get, but what it really should be doing is getting lower when the player gets closer.

    So it works but I need the effect to be reversed...

  • So my game has heavily gravity effected bullets, and what I do for the enemies to make them compensate for their aim is place a position between the player and them, and then put it into the air by some amount of their total distance, so if all the gravities and whatnot are balanced, the bullets should arc towards the player no matter what the distance.

    BUT I don't fully understand the math I am doing and I have run into a bug that only happens when the player goes on the right side of the enemies.

    Desired effect on the left (somewhat)

    <img src="http://puu.sh/2Mrap.png" border="0" />

    and here is my math:

    <img src="http://puu.sh/2Mri5.png" border="0" />

    I have basically no idea what I am doing on the second line but it almost works...

    Any advice? =)

  • Thanks. I think I got it though...

    I deleted the object everything clones from, and now if I do an every tick update, it magically works for each specific associated object. I love construct...

  • Can anyone help? Basically I just want to know how to link objects together that are created on run-time.

  • I wrote it like this:

    On object click, lerp or set the X and Y to the mouse.

    Store the current velocityX and Y of the physics object while it's being dragged.

    On mouse release, set the objects new velocity x and velocity y to the variables you stored.