Hi, I'm working on a game called Resource War for the SC13 competition held by ROSman and I've come across a bug.
The Problem
Clicking on a unit card (the first one, specifically, at the moment) takes you to the unit which is correct but on some parts of the map you are moved to the wrong area. See code in RUnit1 marked THE PROBLEM to see where the maths is messed up.
If anyone could help I'd be very greatful and be sure to credit you in the notes ^^
Last edited by Smozzick (2013-04-18 11:42:31)
Offline
Smozzick wrote:
bump
Okay, so from a quick overview of your code, apparently the problem that's causing this is that your person is technically in a "block", though since it's at the top, your equation thinks that it's a block higher, giving you this glitch. If you do a bit of testing yourself, you'll notice that if you put your person in row 2, yet have him below a YPos of 430, this glitch won't occur. The same holds true with row 1 and a YPos below 90.
Also, this glitch doesn't just occur below row 3. It happens everywhere.
Anyway, I'm going to need a bit more time and testing before I can find the source of this glitch.
With regards,
ErnieParke
Last edited by ErnieParke (2013-04-18 17:01:08)
Offline
ErnieParke wrote:
Smozzick wrote:
bump
Okay, so from a quick overview of your code, apparently the problem that's causing this is that your person is technically in a "block", though since it's at the top, your equation thinks that it's a block higher, giving you this glitch. If you do a bit of testing yourself, you'll notice that if you put your person in row 2, yet have him below a YPos of 430, this glitch won't occur. The same holds true with row 1 and a YPos below 90.
Also, this glitch doesn't just occur below row 3. It happens everywhere.
Anyway, I'm going to need a bit more time and testing before I can find the source of this glitch.
With regards,
ErnieParke
Just tried something that looks like it might work. I changed the maths to:
<<<<[1290] - <<(ypos) - <<(ypos) - [180]> mod [258]>> - [180]>> / [258]> - [1]> * [6]>for the y part. In the cell section that now gives me the correct cell so with any luck it should work...
Last edited by Smozzick (2013-04-18 17:23:15)
Offline
Smozzick wrote:
ErnieParke wrote:
Smozzick wrote:
bump
Okay, so from a quick overview of your code, apparently the problem that's causing this is that your person is technically in a "block", though since it's at the top, your equation thinks that it's a block higher, giving you this glitch. If you do a bit of testing yourself, you'll notice that if you put your person in row 2, yet have him below a YPos of 430, this glitch won't occur. The same holds true with row 1 and a YPos below 90.
Also, this glitch doesn't just occur below row 3. It happens everywhere.
Anyway, I'm going to need a bit more time and testing before I can find the source of this glitch.
With regards,
ErnieParkeJust tried something that looks like it might work. I changed the maths to:
<<<<[1290] - <<(ypos) - <<(ypos) - [180]> mod [258]>> - [180]>> / [258]> - [1]> * [6]>for the y part. In the cell section that now gives me the correct cell so with any luck it should work...
Put it in without the *6 in the part with the main problem and it seems to work. Thanks for the help! I hadn't noticed that it was on different parts of the view so I wasn't sure where the problem was.
Well, at least now you know where it is, and you're welcome! By the way, good luck with your game!
With regards,
ErnieParke
Offline