TiredSundew5639's Recent Forum Activity

  • Okay, I will try to do it without the physics first and also I will try to see if I can use my PC at home to post these topics from now on so I can actually share the file and videos, but I don't know if it will work. Also thank you for all the advice that you have given me, because I definitely would not be able to make my game without people to help me like you, have a great day! I will post an update to see if it works in a few days, and maybe even tomorrow.

    update: it is not freaking out anymore, but I feel like it doesn't move like a fluid enough, but that's a problem for another day, thank you again!

  • Introduction and Code Explanation:

    Basically what is happening is 2 sprites that I called VelvetWormSlime1 and VelvetWormSlime5 will go to image point one and two on the velvet worm and pin themselves to it. After that the other bits of the slime go to each other's different ends, with 1 pinning to 2, 2 to 3, 3 to 4, and 4 to 9 (I know that the ordering is messed up but I added 9 and 10 separately and the code was already in) and also 5 to 6, 6 to 7, 7 to 8, and 8 to 10. I then made revolt joints for each of them in the same way as the pinning, which is where I think one the problems starts. Then the 2 slimes attaching to the worm rotate with the sine behavior and than everything freaks out, I sadly can't post a video of it since I am on a school computer so I just took multiple screenshots of what happened. When I get rid of the sine code, it doesn't freak out as much but I need it so that the slime acts like a wave or a rope being pulled up and down.

    TLDR: I made multiple sprites create revolt joints and pin them to each other, and when I make the ones attached to the velvet worm rotate to create a wave or rope motion, the rest of the attached sprites freak out

    Here are some screenshots of the chaos and code, sadly I can't share a video or the project because of this school computer, so I am sorry if the screenshots don't help much

    Tagged:

  • First thing I am going to say is, you may want to take a step back and work through a few more basic tutorials before trying this project. You may not be ready yet. Each answer seems to lead to more questions which means you really could use some more experience with the engine (and game design in general). This isn't meant to discourage you. In fact, struggling with a bigger project than you are ready to complete is the more discouraging thing here and after getting some more knowhow first will lead to a better project in the end.

    That being said, Here is an example file that I hope can show you how to solve these problems.

    https://drive.google.com/file/d/1vXpKAC46NGnCxcb4O7n_P8i31WQ1m9dB/view?usp=sharing

    The game freezing is caused by an endless loop. This means the while loop used to draw your ray is never finding an end point so it is continuing off into infinity. The events that happen after the loop are never reached and eventually the computer will run out of memory. This is solved simply by guaranteeing the ray stops growing at some point. In the example, I give it a max length as one of the conditions for the while loop. Any time you are using a while loop in your game, if the game freezes, the first thing to check is if there is an endless loop.

    Again, for the angle of the arrow, I will have to make some assumptions. I assume you are using the orbit behavior. This would seem to make sense because you want it to orbit the heart. However, some of the functionality of the orbit behavior (the way it rotates the object for example) is not compatible with the result you are looking for. For my example, I found it better to use the rotate behavior and set the origin of the arrow a little to the left of the sprite. To see this, edit the sprite and look at the position of the origin. If you then set the position of the arrow to the position of the heart, the rotate behavior will rotate the arrow around the arrows origin causing it to appear to orbit the heart. I then pinned the arrow to the heart, without allowing the pin to set the rotation, to ensure the arrow stays with the heart.

    There are of course other ways to fix the angle. For example, you could disable the orbit functions rotate property and use events to manually set the angle. But I'm lazy so I would rather not do that extra work.

    You'll notice the player uses a variable to ensure the teleport isn't automatically triggered on arrival at the end destination.

    Ok I did that and it solved all of my teleportation/arrow problems, thank you so much! and I will look through more tutorials to get more experience, so thanks for the suggestion and thank you for being patient, have a GREAT Halloween!

  • You haven't given public access to that project but I requested access. You will have to accept my request.

    That being said, You should take a look at the example mrcgkh posted in this thread. It uses an instance variable that gets set when the player enters the portal and only gets reset when the player is no longer touching a portal.

    It works now, but there is one problem, if I spawn the ray while part of or all of the arrow is outside of the walls, it freezes the game. How do I make it so that it doesn't do that?

    Also I need the arrow to face away from the soul

    like this whenever it is orbiting it

    but no matter what I do it is like this

    and I can't just have it in the right angle by default in the animation because if I do, the ray shoots off from the side and not the tip, and even if I change the angle in the properties area, it doesn't change

  • Without the project, I have to make a few assumptions. What I would suggest first is, make sure your character doesn't overlap the exit portal when teleporting to it. There is a chance that the character teleports but is immediately teleported back to the entrance portal.

    Ways to test would be to disable the exit portal events and just use the entrance portal. If the teleport works, check to see if the sprites overlap.

    If you disable the exit portal events but the character still doesn't teleport, there is something wrong with how your event is set up.

    Ok I did that and disabling the exit allowed the entrance to teleport it just fine, but I don't know what to do next and you said to check to see if the sprites overlap, but if the soul is overlapping it, how can I apply that to the code and fix it, and why is it only happening to the Burrow entrance? Also I got a link to the project and I was wondering if you can access it or not

    Thanks for the help and I am sorry it took so long to reply, I took a break

    drive.google.com/file/d/1zFw6skfVe_VOOjgSqnng4DkrNVOiEZmM/view

    edit: InDWrekt I wasn't able to share the file because when I try to share it with you, it says I can't share to people outside of my school, so I am going to have to go back to showing screenshots. Also I found something interesting and weird, when I swap the burrow entrance and burrow exit in terms of which one goes first (putting one on top of the other)the one on the bottom works but the one on the top doesn't

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Basically for some reason (even though the code for both of them is pretty much the same) going into the burrow exit takes me to the burrow entrance (so it works) but for some reason if I try to do the same but try to go through the burrow entrance, it doesn't take me to it (that or it just goes there for less than a second and then goes back)

    Also I would share the project here but I don't know how and since I am on a school computer, if I try to share it via google drive it says that only people in my school can access the link, so please tell me how I can post the file here so it can be easier for this and for my future problems.

    I would show screenshots, but I want to wait and see if I can share the project and I don't think the screenshots would help since I can't find the source of the problem

    drive.google.com/file/d/1zFw6skfVe_VOOjgSqnng4DkrNVOiEZmM/view

  • it works now (a side from a few tweaks), Thank you so much and I hope you have a great day!

  • ok I will give it a shot, and the reason why I didn't share the project is that I am having difficulties sharing it, probably since this is a school computer and I have tried a lot of things to try to share it like sharing it via google drive (which said that I can only share it with people in my school), I tried dragging and dropping, copying and pasting, and other things.

  • you can also find an example of raytracing and line of sight combination here:

    https://youtu.be/TOjp6SPSz7o

    maybe that can help?

    Sadly I can't access the video since I am on a school computer

  • Try out this sample project. It uses a simplistic form of raytracing. That means, it draws a line (casts a ray) from the arrow to the wall. To see the ray, just disable the Ray Destroy action.

    https://drive.google.com/file/d/1Aj8mMS1FvkMsbzUVTBarXNBRPpXNYWgV/view?usp=sharing

    Ok I just tried it and put it into my project with some minor modifications (like the mouse thing since I don't need that since the arrow I have is orbiting the soul until I press z) and it doesn't work exactly as expected since the walls I have are actually four different sprites in one family, so instead of the ray just going straight at all times, it just goes off course and goes to the nearest wall, as opposed to where it is pointing.

    this is the code that I got so far for the arrow

    and this is what the ray and burrow entrance do when I press z, it just goes down to the nearest wall instead of going straight at all times

  • Basically for the adaptation soul, I want it to be like a portal gun, though I'll work on the whole portal part of it later. For now I am trying to make it so that once the arrow stops, it makes the burrow entrance go directly to the closest wall and rotate itself based on which wall it is on. The biggest problem is how to tell the system if the arrow is "pointing" at something or not. Basically I made it so that the arrow orbits around the soul and when I press z it makes the arrow stop, what I am having trouble with is making it so that when the arrow stops, it makes the burrow entrance stick to the wall it is pointing at and at that specific point the arrow is pointing

    In the image I gave the arrow the turret behavior because I was seeing if it could maybe see the wall and know what area to put it in, I know I am probably not making sense but I don't know how to describe it. If you want I could try to share my project so you have a better idea about the code but I am having difficulties trying to make a copy of the project and put it on the post

    This is what happens so far, so it does go on the wall but not the one I want, I want it so the burrow goes to the wall that the arrow is pointing at, the problem is I don't know how to tell the system when the arrow is "pointing" at something and I don't know if I should use the line of sight behavior or not

  • To make it easier in the future, can you guys also tell me how to copy and paste the project onto here? I have tried many things like copying the URL, opening the file and try to copy and paste it in here, open the file and drag it in here (which said that it automatically blocks downloads from this sight and even when I turn it off, it still won't let me do so, probably because I am on a school computer), and I have tried to do what Ashley told us to do on the "how to get help" post, but again since I am on a school computer I can only share the project on google drive to my school.

TiredSundew5639's avatar

TiredSundew5639

Member since 21 Jan, 2020

Twitter
TiredSundew5639 has 1 followers

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies