littanana's Recent Forum Activity

  • So yeah I want to be able to only carry one item at once.

    I want it that when I press z it will drop an item if its carrying something. Only after that if I press Z it will pick up an item.

    Also I want to be be able to have a different set of animation when carrying the item. And less jump power.

    https://drive.google.com/file/d/0B6czatIgBi7lT2luUEN0dnpYSXc/view?usp=sharing[/code:2vwz43zh]
  • I would also like to know how to modify the code to work with multiple instances of the same sprite. I want to pick up an item and put it down. Only one item can be carried at once.

  • Why is the animation not working when pushing up-arrow?

    - Because pushing the up arrow makes the player jump and when jumping you want the jump animation to play, so the program is told to play two animations at the same time, which is impossible..

    Why is the animation playing when not moving?

    - Because your event states to play the animation while overlapping and that condition is true..

    First thing you should probably do is remove the default controls from you behaviour and add your own in events..

    Also you seem to not understand the difference between triggered events and normal events..

    Adding a "system every tick" condition to a triggered event is useless..

    Your event 23 only changes the angle "on collision" so when no collision is registered the player angle will not change to platform angle..

    So I changed my code in the following way;

    • I added to my other animations to activate when I'm not using the ladder so now the animations don't overlap.
    • I changed the angle detection to "every tick" and "is overlapping solid at offset (0,5)"

    I will keep the default controls for now but if I run into problems I will re do them. Thank you so much for this reply. I learned a lot!

  • When using the ladder the animations play all weird. When moving down and not moving the animation does play but when moving up it doesn't play.

    I need it to not play when not moving and play when I'm moving up and down.

    Also bonus problem; Even thought I have every tick change player angle to platform angle, why does this happen?

    .capx for my file

    https://drive.google.com/file/d/0Bw7sth_-pQTXSGtUdGZiT0d2MGM/view?usp=sharing[/code:thb6bl3x]
    edit: i changed the link
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > No I don't because the code says "choose(0,90,180,270)" or a variation of that and it always changes depending of the position of sprite, like for example if i have walls in the north and south the code does "choose(0,180)"

    >

    > And I have a code for every single possible combination in between a wall at every side, and a wall and no side.

    >

    Well after the choose() expression the direction is chosen right?

    So that direction should determine the animation..

    Maybe to make it easier on yourself, you could set an instance variable on the sprite to the choose() and use that instance variable for setting the animation..

    Another way, if this choose sets the bullet direction, you might also be able to add a condition

    for each sprite

    system compare two values: sprite.bullet.angleofmovement = 180

    > set animation

    Heh, actually I just finished doing that changing the choose() to pick a variable and came back to the thread to see it recommended, and yes it works much better now.

  • No I don't because the code says "choose(0,90,180,270)" or a variation of that and it always changes depending of the position of sprite, like for example if i have walls in the north and south the code does "choose(0,180)"

    And I have a code for every single possible combination in between a wall at every side, and a wall and no side.

  • 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]
  • 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!

littanana's avatar

littanana

Member since 27 Nov, 2015

None one is following littanana yet!

Connect with littanana

Trophy Case

  • 9-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

11/44
How to earn trophies