rekjl's Forum Posts

  • Hello everyone,

    Using the Scroll To behavior, the player will remain in the middle as long as it is not near the edges. But is there a way to change the location of the player when using this behavior? The player will be on auto movement, so I would like the player to be more to the left than the center.

    I open the example autorunner, but it used a different method, and I am afraid it might not work for my game because of how certain objects in my game function.

    Would really appreciate any help. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A possible discount this Christmas?! There goes my money allocation for Santa's cookies!! <img src="smileys/smiley36.gif" border="0" align="middle" />

  • blackhornet thanks for your help!

    I've opened the file and studied it. Haha I am very very weak in programming so it took some time to understand, also had to look up what the abs function was. I think I've finally understood it.

    The abs event was referring to the tolerance you were talking about? Once the range to the original position is within 1, it automatically jumps back to the original position.

    Thanks for the drag and drop clarification as well. I only used it to test if it was taking a longer time to return to the original position, and I never paid attention to the scenario of x and y reaching 0 separately.

    Again, thank you very much for your help blackhornet. I really appreciate it!

  • Hello everyone,

    I wanted to create a drag and drop where the released object will return to its original position slowly. I used lerp for this. I got the effect I was looking for ultimately, but there was something weird.

    The object looks like it has return to its original position, but it hasn't. I use the disable drag and drop to confirm this and indeed it takes a couple of second to fully return to position. I am not sure how to fix this. Would love any help on this. Also, is this the right way to do this, or is there a more efficient way?

    This is the screenshot of the events.

    <img src="https://www.dropbox.com/s/3mgwecskcejzvtd/1.jpg" border="0" />

    The capx file.

    dropbox.com/s/25yoti1i9g8tzit/test10.capx

    Thanks to anyone who is able to help.

  • Haha thanks Game. Really appreciate it!

    Just an update though, I learned about dt today so I implemented it. I changed the pixel speed to (the speed of my character movement)200*dt. It climbs at the same speed as on flat ground. Haha with this we can adjust it to make the character climb slopes at a slower pace.

  • Yahoo! I did it Yann and Games <img src="smileys/smiley36.gif" border="0" align="middle" />

    Haha I am not sure how efficient my coding is, but it does allow us to set the limit for climbable slopes for the player in the game.

    Hopefully it might be of help or use to someone.

    dropbox.com/s/tfljopcivdg28lm/test6.capx

  • Thanks for that link Games.

    I tried the game out, but it looks like the two slopes in there are both under the 45degrees mark.

    Actually, I am getting close to a solution. I use the on collision with the sloped platform as a trigger. Than check whether to see if the angle is between the angles I am looking for. And also to check if the correct key is pressed, I perform the sprite move at angle action. I set the angle to the same one as the platform, and + or - depending on the movement direction.

    It works well to certain extent. It moves only once, so I need to continue to press. I can't use the on key press down because it is a trigger and I already have one trigger with the collision detection.

    I am going to try the bullet option next. Hopefully I will be able to find a workaround to this.

  • Haha I am very new to construct 2 as well Games.

    I am poor in programming, so maybe someone else can confirm this, but your solution does make perfect sense in terms of the logic. Haha might take a lot of events to get it to work properly, but it is worth a try indeed! Thanks!

  • That's an interesting solution Games.

    I might be wrong, but if we do use the bullet movement for the character to climb the slope, won't the player lose control of the character during the climb? If we set the bullet movement to stop when the player presses a button, and the character is still halfway climbing up the platform, won't the character get stuck there?

  • Yann thanks for your reply. Yup that's what I want to do. That's really too bad. I guess I will have to rethink my game concepts and designs.

    After some testing, it appears that the maximum angle of slope movement is indeed 45 degrees. Hopefully the good people of Construct 2 might consider an option for this in their next release.

  • Haha and Funny and yet thought provoking as well! Many Game creators really do have a fun perspective!! <img src="smileys/smiley36.gif" border="0" align="middle" />

  • As someone who has no talent with sound creation, a huge thank you!!

  • Looks really ...."cool"!! <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Niceee! Thanks!

  • I use 3D S Max and Photoshop for mostly everything. I really need to learn how to use GIMP. I think I did try it once.....many many years ago :p. Will definitely try some of the 2D and other software recommended here.