How can I extend a weapon's range to go both north and south? I am having trouble making the weapon go south. I have tried using my coordinates, but if my y coordinate is 15 and I input me.y minus 5, it makes the range 10. So I tried getting the tile info and subtracting 5, but it says does not allow a string variable and a map type to communicate. I have also installed rotation coding and tried making the weapon face south. The only one possible thing I haven't tried yet is creating x and y coordinates for the weapon, setting them always equal to my coordinates, and then subtracting the number from its coordinates. But again, a string can not communicate with a map type. I have both underthought and overthought this issue. Please let me know if you find a solution.

If something is worse than society, then it is a problem

+1

Any time you want to compensate for negatives where you don't want to allow negatives in your thing, which is what you want right now, you use absolute value. OK, I'm like the last person on this earth who should be giving math advice, but absolute value is a number's distance from 0. The absolute value of a positive number is positive, and the absolute value of a negative number is also positive. So if you wanted this beast mode weapon that did damage in both directions at once, you'd get the distance from him to you, and take the absolute value of that, so it wouldn't matter, it would still hit.

Sorry for the bad explanation, I'm sure someone will be able to do it better. Math is not my jam, like at all.

One of the best gifts on this earth is the unconditional love of an animal

It is pure, free of judgement, and raises me to the utter height of glory.

+1

I didn’t think about the math part lol. Thanks and I understand your comment perfectly. Another question is how would I make it go both north and east? I’m thinking of using an expression like 0 to pi/2 or 0 to 90. I know this is not an easy question, just curious if you have any idea how

If something is worse than society, then it is a problem

+1

I’m good at math, but not when the coding engine is involved

If something is worse than society, then it is a problem

+1

Sorry for third post in a row. I am having trouble assigning the absolute value to the range variable. I have looked at the absolute section in the manual but it still is not working. I've tried double range and in the weapon properties typed absolute(-5). And I tried range as an integer variable as well. Any tips on why it is not working for negative values still?

If something is worse than society, then it is a problem

+1