I guess it was a false alarm. That being said, the game have potential however it is not an English game. Sadly, that is not going to work for me. I like the concept though.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Snarky on Sat 04/02/2023 19:26:02Quote from: xboxown on Sat 04/02/2023 18:37:53
Let's examine your code a little more closely. The cHelperXC100.Walk() commands have inline calculations where you first add the cHelperCX100.x/y values, and then subtract them again. That will of course cancel out, so if we simplify, we get:
It now should become apparent that the case if (cHelperCX100.y-itemY<20) is wrong. You're telling it to go to the -itemY coordinate, but this will be some point off screen.
I would also point out that the tests here are... odd. You're checking if some value is <20, then if the exact same value is >20, and finally, if neither is the case, you do the horizontal walk. In other words, you only do a horizontal walk if cHelperCX100 is exactly 20 pixels below itemY. I doubt that this is the effect you intend. I presume that what you're actually trying to do is to say that if the character Y value is within 20 pixels of the item Y value, we're close enough, so just move horizontally. Otherwise move in both the x and y direction. To do this, the tests need to be done like:
It would be even better to use an Abs() function, but let's skip that for now.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.072 seconds with 19 queries.