Calfuso's Forum Posts

  • Okay so i didn't say the name of the sprite that need to be fixed and which layout it is in and such. It's name is Sprite 255 and it is pinned to Sprite 256. It is in Layout 17 and the events related to it is in Event Sheet 4. To find the events related to it, just search Sprite255 in the Search Bar in the Event Sheet. It is the layout you directly go to when you open the capx so i guess some of you could have assumed which sprite it was but in case you haven't i don't want to read confused answers so i will ignore the answers made up to this point. I will only read answers made after this post. So i hope that should make things clear enough. I hope that you still answer even after this and if your first answer was helpful whitout the information so just post it again.

  • In my project i have a sprite that should begin whit moving around whit the 8 direction movement and then switch back to 8 direction movement. I have succeded whit making it switch from 8 direcrion movement to platform movement but not make it switch back to 8 direction movement. Here is my Construct 2 file. The goal is to make the sprite jump up on to the platform when it switches to the platform movement and jump again when it reaches a sprite in the middle of the platform and then fall down and go back to the 8 direction movement. I have made it so it changes to another animation when it collide whit the sprite in the middle so it can go back to 8 direction movement when it falls from the platform so it won't change directions on collision whit that sprite before that. As it is now it falls from the platform but then get,s stuck and does not move and do what the events make it should. I have tried many things but everything always fail one way or another. You can just give me answer based on what i have written here or you can look into the capx and either fix this or find out what i need to fix. Don't look deeper into the capx then necissary and don't comment on anything unecissary. My capx takes up alot of memory so know you know that and don't need to comment on that.

    https://www.dropbox.com/s/hksfcr5hzqtw9 ... .capx?dl=0

  • So i have a problem whit a sprite in my project. It is supposed to spawn other sprites in various ways. But it doesn't do it for some reason. I don't think i can clearly explain the sitaution in words and get a good answer so i will share my project here. The problem sprite is Sprite 236. There is alot of events connected to it in the latest part of Event Sheet 4. The Action 2 events is supposed to make it spawn other sprites but it doesn't. Sometimes i can make it so it spawns sprites but then it does it every tick for some reason so don't make that happen either. It is supposed to spawn things sometimes. The Action 3 events is supposed to make it jump sometimes but it never does. The Action 4 events is also supposed to make it spawn things sometimes but it never does. The Action 5 events is supposed to make it move left and rigth by collide into Edgemarker15 but it just moves to the rigth and never changes direction. Overall the sprite don't work at all for some reason. I don't knwo why since i have done similiar things whit other sprites and has worked just fine. So i would be happy if you could fix this. The sprite is in Layout 15 so you need to make everything work there. My project takes up alot of memory, i know so you don't need to comment on that.

    https://www.dropbox.com/s/shq9teqx7oect ... .capx?dl=0

  • Whenever i try to open it Construct 2 just says error document empty. So how do you open it succesfully?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A capx would help, it is hard to visualize your situation.

    I will share teh capx if my second explonation isn't enough. I want the enemy to react differently depending on which side the player is from it and how far away the player is from it. The enemy is supposed to begin moving when the player is pretty close to it. Using Line of sigth as a trigger for that doesn't seem to work. Having two sprites always being on one side and distance from the player doesn't work. Is there anything else that can make this work that i haven't tried. The goal being that the enemy is going to begin to move when it is a certain distance form the player and react differently depending on which side the player is to it.

  • Do you need the other sprites you want to pass through have the platform behavior? If you need it just for gravity, you can do similar with the bullet behavior.

    The other sprites need the platform behavior becuase they is supposed to move up slopes and move on platforms that aren't completly flat. They are just not going to stopped by the platforms the player sprites is standing on. I suppose i can make still give the other the bullet behavior and make them move in the directions they would move in whit the platform behavior. But i still would want a another answer so i don't have to do that.

  • Do you need the other sprites you want to pass through have the platform behavior? If you need it just for gravity, you can do similar with the bullet behavior.

  • I have asked this question before so lock the thread if you want but i would like you not to. I like to ask questions again if i it's been a while since i asked it before so please understand the situation here. How do you make a sprite whit the platform behavior solid when one sprite touch it but not when other sprites whit the platform behavior touch it? So that one sprite whit the platform behavior can stand on it and can't move through it but other sprites can't stand on it and can move through it? I would like an detalied answer and a another answer if i don't understand it well enough and ask for a clearer version of the answer.

  • I have made a sprite before that could switch values depending on what sprite it was overlapping at offset. The values was switching from left and rigth. And it worked well for that sprite. But now i tried making another sprite have this behavior. I have set up the variables and events in the exact same way and yet the Sprite does not show any reaction by overlapping the sprites. It is supposed to be to move in different way but it never starts moving. Then i tried using the clone object type option one the sprite that could have the behavior sucessfully. It makes the other sprite have the exact same properties. So i made the same events for that sprite and it still does not work event though it is identical to the first sprite. The thing i am aiming for is that the second sprite is going to get different values depending on which side the player is of it and it should only be able to set those values when the player is a certain distance away. I tried is whitin angle but that does not work either. So i would like to get help whit another solution to reach what i am aiming for.

  • Hey Cal,

    It just uses regular readable maths so its either Sprite.X-750 or +750

    Upload a cap.x if you are still having issues as its so much easier to help that way.

    Okay so it is + instead. I thaugth only variations of - worked since for platform set vector x it is no - and number for movement to rigth and - and number movement to the left so i thaugth just set x was the same but i guess not. Thanks for the help anyway. It was helpful and nice.

  • What i am aiming at is to make one sprite always be a certain distance away from the left side of one sprite and another sprite always be a certain distance away from one sprites rigth side. You can make it to so it always is on the left side of the sprite be making the event every tick and set X Sprite.X-750 tex. But making it always be on the rigth side of the sprite is more problematic. I firts thaugth you needed to set X to Sprite.X--750 tex but that makes the sprite always be on the left side like the first sprite. The next option would be set X to Sprite.X750. No - in other words. But i can't find a way to write it so Construct accepts it and make it a working event. So how do you do it?

    I have asked thsi question before but i spammed in that topic so i don't want it to count anymore. I want to delete but i don't know how you delete your own topics. So if you want you can make a answer in this topic. I will wait as long as it takes and i won't spam.

    I spammed in the last version of this topic and i would like to delete that topic but i don't know how to do it. But i still feel bad for that topic so now i make a new version and i won't spam and i will wait for an answer no matter how long it will take. I want an enemy to move to the left when it is a certain distance from the rigth side of the player. Then it is going to pass the player, keep moving left. When it is a certain distance away from the left side of the player it is going to switch to moving rigth. Then it is going to pass the player and repeat the process so it basically follows the player. I tried making this work by doing this.

    Enemy-Event-Is whitin angle

    Whitin: 180

    Angle: 0

    Enemy-Sub event-Compare X

    Player.X-1500

    Enemy-Action-Set value

    Action

    "left"

    Enemy-Event-Compare instance variable

    Action

    Equals to

    "left"

    Enemy-Action

    Simulate control pressing left

    Enemy-Event-Is whitin angle

    Whitin: 180

    Angle: 180

    Enemy-Sub event-Compare X

    Player.X--1500

    Enemy-Action

    Set value

    Action

    "rigth"

    Enemy-Event-Compare instance variable

    Action

    Equals to

    "rigth"

    Enemy-Action

    Simulate control pressing rigth

    Whit this it should work. But it doesn't. So what do i need to

    change to make it work?

  • I am going to keep replying until i get an answer.

  • I am going to keep replying until i get an answer.