littanana's Forum Posts

  • So I'm trying to build on an example for grid movements, I need to be able to figure out what direction the sprite is moving to, since I want to be able to change animations, and create a wall block in front of them after they started moving. I am trying to achieve my sprites not overlapping trough each other and not moving on the same place so if I created a block after the sprite has started moving no other sprites could move there at the same time.

    Currently I am using a lot of code to determine what direction to move to and "choose(1,2,3,4)" direction so I don't know how I can pick the direction directly because its random.

    Basically what I want to do is;

    if *sprites started moving to direction x*

    --> set animation to x

    --> create block at position x

    I never added the animations, but I know how to do it by myself if I find a way to determine where and when it started moving.

    https://drive.google.com/open?id=0Bw7sth_-pQTXVjZQdlZyTlNna0E[/code:244fcizz]
  • I don't think this is the answer for my problem, also since my game is a platformer game, so I have no idea how to even implement that into my game based on that .capx

    My idea to solve this would be to find a way to separate two of the same sprite which are overlapping, and I want the one on the left to move a pixel towards left, and the one on the right to move a pixel towards right. However, I have no idea how this can be done.

    Here is my code if someone has an idea how to solve this on the AI moving code. (Basically it is just simple platformer ai code, move left if the player is left etc... so yeah...)

    https://drive.google.com/file/d/0Bw7sth_-pQTXUHRNQXhSUTdDMDA/view?usp=sharing[/code:3ezjlvdm]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want them to not overlap. So basically, something like, the enemy that is on the left should move one pixel to the left and the one on the right should move one pixel to the right until they are no longer overlapping. I tried to make something like this happen, but the code just didn't work I always just get the sprites try and escape to the same direction. :I

    I don't have problem with touching the player since they start an melee attack that stops them from running when they get close enough. But it just looks so silly when I have 3 enemies running and doing the same attack while overlapping with each other.

    This is my latest failure:

    Sorry if I was unclear in my first post, I don't have a problem with the player overlapping with the enemy I can fix that, but I have a problem with enemy overlapping with another enemy (which is the same sprite).

  • Hey, so is there a way to stop my sprites from overlapping each other? I have a basic platform ai that makes them case the player as it comes close enough, however since there are multiple enemies they all will run after the player and overlap with each other. I don't want this to happen. What can I do to stop this?

    I considered making them solid, but that just is asking for problems since now I can jump on top of the enemies and thats not something that should happen. Also get stunlocked in between two enemies.

  • You've set left/right pressed > rolling=0 but you can't press left/right because you've disabled player input so it just continues to roll until it collides with something.

    That's exactly whats supposed to happen.

    Either way I cleaned up the code a lot earlier and its working fine now. So yeah. I still have to add in combat, movements, but I don't think its going to be too difficult at this point. After that my platform engine is completed.

  • Thank you, if this is as close as a solution I can get to, I will take it!

  • So yeah, I'm trying to make a system that causes my princess to roll down when on a slope... Rolling works fine, it continues and hits the wall and stops. This is what I want it to do. However for some reason I am able to move and press my arrow to the opposite direction and the sprite stops moving for the duration, I also can jump, which should not be able to happen. I think something on the ladder (petra) code breaks this, but I have no idea what it is.

    I've been trying to figure out the problem for a bunch of hours and I think I'm just going to ask for help again, I'm sure its something simple, I just can't see it.

    So, uh yeah? Please help me out if you know whats wrong. heh

    Here is the .capx file

    https://drive.google.com/file/d/0Bw7sth_-pQTXTFRtMTgtd2MxZFE/view?usp=sharing[/code:ori7crpu]
  • Well, one way to get this to work is to just create new animations for the sprite. blackup, blackacross, blackarched, blueup, blue across, bluearched,... and so on. You could keep them all in the same sprite so you don't have to clone balls or events.

    Make some kind of variable on the sprite to see if color should be blue it will use the blue animations instead.

    Is this what you are after?

  • Ah, it worked! Thank you!

  • Ok, new question. However this time the blurring is being caused by zooming in...

    I want my game to zoom in 200% whenever I have a dialogue and the box showing, this blurs my pixels again.

    Is there anything I can do to prevent this?

    I had a thought that I could just make all my art twice the size, as in draw everything with 4 pixels in a group instead of one, what i have now. But would this even work, since then I should make all my sprites half the size and I think that might blur it anyway??

    Any input? Heh.

    Here are screenshots;

  • Hi, here is an excerpt from the "Project primitives > Projects" chapter of the manual that I think will answer your question:

    [quote:2exkvyg9]Pixel rounding

    By default Construct 2 objects can be drawn at sub-pixel positions, e.g. (100.3, 200.8). If the browser is using linear filtering, this can make fine pixel art appear blurry. If Pixel rounding is set to On, Construct 2 objects round their position to a whole number before drawing, e.g. (100, 201). This prevents any blurring, and can also prevent "seams" appearing on grids of objects. Note this does not affect their actual X and Y co-ordinates, which can still be between pixels - it only affects where they are drawn on the screen.

    I hope this helps.

    Thank you this totally fixed it!

  • You could share the .capx so we can see better what is going on.

    However if I understood correctly, you could go around this problem by disabling all the buttons from the home menu when the options screen is active.

  • Basically my pixels look all blurred sometimes, like if i stand on a specific point and if i move tiny amounts like one pixel at a time my sprite will blur, at some point it will start de-blurring and then become clear again.

    Like I'm basically standing almost on the same point but in the other picture i moved a bit and my sprite is blurred.

    What is causing this and is it possible to prevent it? How?

    Also like, what is generally the best idea how to set my project configuration settings? I want it to be fullscreen and still keep my pixels clear every time.

    edit: just wondering; if this question doesn't get answered at what point should repost it outside of the beginner questions forum?

  • Ah thank you! I didn't realize I made this mistake. It works now.

  • Well then I have no idea what is the problem once again, I am trying to achieive that walking next to the npc will show the exclamation mark and when you press E it should disappear and text should show. Walking away should hide the text and the exclamation mark.

    Here is the capx file if someone could nicely take a look and tell me what I am doing wrong!

    https://drive google com/file/d/0Bw7sth_-pQTXbmZNLTZvbkpOaE0/view?usp=sharing[/code:yyo7bvit]
    (add dots to the url)