2017-07-16 17:36:27 (edited by kianoosh 2017-07-16 17:37:40)

Hi guise. Today i decided to give one of my old games a try and decided to code some interesting stuff like a sniper. Well i did this and everything worked well, except the moving which is used from bgt rotation package written by sam tupy.
In this system that i wrote for the sniper, player presses l, selects a target, then they can press enter to track the target or hold down left shift key and press enter to get the angle for the target between the player itself and that target, then they can press alt to set their facing based on that angle. For example if the angle is 50 and their facing is 45,  When they press the alt key, there facing will be 95 (Means 45+50=95). But the problem is here. When they fire their gun, The bullets moves and each tile it passes, it doesn't stay on the coord that i told the program to move bullet based on that. The same problem with player's movement and the movements are all used that move function in rotation package. To be more clear, Here is what i did:
bullets left braket i right braket .location=move(bullets left braket i right braket .location.x, bullets left braket i right braket .location.y, bullets left braket i right braket .location.z, facing, 0.0);
I did replaced [ and ] with left braket and right braket to avoid forum errors.
Am i doing something wrong? Or did i forgot or didn't include something?
Or this is the problem of that rotation package. If so, Could anyone please give me a fixed version or something?
Thanks for reading.

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2017-07-16 18:44:26

Two questions.  First, it looks like, based on the little I see, that the bullets are in an array.  Is that correct?  Second, would it be possible for me to see the actual code you've written...not the whole code, obviously, just the sections that you're referring to, as well as the code for the rotation packet, please?

2017-07-16 20:36:29

Rotation package is at samtupy.com developer resources page, And I already wrote the code in the first post, That's what moves the bullet based on the direction

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2017-07-16 21:09:12

Code in the first post wasn't written the way in would be in BGT, since there are spaces and such where you spelled out punctuation and things.  I'd prefer to see the actual way it was written in BGT.  Easier for me to spot issues that way.

2017-07-16 23:35:18 (edited by kianoosh 2017-07-16 23:35:34)

Do you have a skype id so i can send it to you

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2017-07-17 00:57:05

jwmckinniss is my Skype ID.  Not sure if I listed it in my profile, need to go see.

2017-07-17 14:17:36

One solution is rounding the new positions, but isn't the best at all.

2017-07-17 15:18:59

I did that already.

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988