2018-07-31 00:51:02

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.

2018-07-31 01:46:27

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.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2018-07-31 04:11:32

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

2018-07-31 04:13:17

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

2018-08-01 07:56:58

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?