Post your maps as an attachment to the reply and this way I can help take a look and determine why they are not working. Keep in mind that that all trace line does is looks for a unit or object in front that the cross hair is on, and if it doesn't see something after a certain distance it returns the point of the ground that is selected.
On a side note, I tried to add the traceline action to a library yesterday and for some reason I got an error message. I do not have time this morning to try it again so you can see it but I would like to figure it out for the library use. Ill post the exact message later but if anyone wanted to try to figure out the problem earlier before I get off work today, that would be awesome.
Rrowland thats not correct basically the fastest time you can implement is .0001 of a second well if you input 0.0 is actually refreshing as fast as possible which is even faster. I noticed with the traceline function there is no need to do it faster than .2 seconds because you will eat alot of ram the other method just redoing the same feature. This will cause latency problems later on with multi-player maps and for slower machines.
And yes the traceline works on my map all the trace line is implementing is pulling up the boss bar. This is a sign that it is selected if you want to fire you can bastically use a mouse click function off just the trace line and make it attack the traceline_currentTarget. Right now mine is using a seperate mouse click feature but its because I was having problems making it 100% accurate. A traceline function does just this because now you have selected a target on the x-y plane along that line. The code I asked Rrowland for is to actually turn allow you to trace a line on the x-y-z plane.
If you both want to post your most updated code I have no problem looking at it trying to figure out your problem.
Rrowland I have a question for you? How did your trace line to affect a Mutalisk in that first video? I put some air units in the map and I have to aim low still to view their information? A heads up Rrowland I am an Engineer IRL and I have taken alot of physics classes what I meant by basically the friction caused by wind resistance is minimal. When we as humans shoot bullets from the perspective of where the gun is it is impossible to see the speed of the bullet decrease. The biggest objective of this happening is speed decreasing. For the purpose of third person shooters gravity will play a large enough role to stop the bullet and bring it back down.
But you are correct if I really wanted to put physics into the map I could also use wind resistance to decrease the speed of the bullet and possibly arc the trajectory to the left or right if there were wind in that direction. But because a bullet travels starting off at about 250m/s the arc is usually going to be no more or less then a couple inches in either direction.
I appreciate all the help and look forward to discussing this further maybe you could help out with make bullets do the same effect but traveling on that line. That is if your game on helping out a non programmer such as myself.
I think i also know your problem. If you read the code he is setting the Array up using the playernumber instead of using playernumber-1 if your trying so you need to account for this when you try to pull the data from the global variables that are set up. if you want it to start at zero just do the math and your good.
Hey Kanaru take a look at my map it works on there its nothing special but it works. Everything is fully implemented. I have also currently set up a way to alternate between 3rd person to top view. Alot of the stuff is going to be used in my Library I am making and some of it is not being used cause I have modified it. All that you need to know to test it is this hit esc to put the game in 3rd person shooter, then turn till you aim at one of the four units. When you actually target one it will pull up showing their information on a boss bar. The exact way it was shown in reaver madness. If you decide to fire. I was using my own version of a modified x,y coordinate to aim so its not 100% accurate.
I agree but I was also thinking of using it to draw a line for a projectile to follow, I was going to factor in gravity, and I have done some research already and Gravity isn't the same due to scaling of the game. I figure If the average person is about 2 m high it means that a ghost is about .6 of the map scale. this to me means that that is approximately equivalent to 2 meters. That means gravity is closer to a -1 unit per second. As far as wind this might be good in a golf game or if you were sniping at a long distance, but for something fairly close this wont matter. I was also thinking of using this to display information about units and am having no luck with that aspect.
Thanks for this. It helps getting it working Rrowland I am working on adding physics to this because this can be used as a vector for trajectories. So I can add to my library for all map makers I am making. Cause right now if you use this to fire it directly hits the target which is good but it doesn't account for what if the target is moving and you have to lead the target. This is important because that is physically how things should work. I found a guy who wrote some code that uses projectiles to hit targets the dilemma he has is the formula incorrect so the patterns that they use are alright. I intend on take both, also Rrowland I hope your fine with me using this traceline function in my library I am making for the mapping community. I talked to you a little about it when I contacted you on YouTube.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Post your maps as an attachment to the reply and this way I can help take a look and determine why they are not working. Keep in mind that that all trace line does is looks for a unit or object in front that the cross hair is on, and if it doesn't see something after a certain distance it returns the point of the ground that is selected.
On a side note, I tried to add the traceline action to a library yesterday and for some reason I got an error message. I do not have time this morning to try it again so you can see it but I would like to figure it out for the library use. Ill post the exact message later but if anyone wanted to try to figure out the problem earlier before I get off work today, that would be awesome.
Rrowland thats not correct basically the fastest time you can implement is .0001 of a second well if you input 0.0 is actually refreshing as fast as possible which is even faster. I noticed with the traceline function there is no need to do it faster than .2 seconds because you will eat alot of ram the other method just redoing the same feature. This will cause latency problems later on with multi-player maps and for slower machines.
I appreciate it Rrowland thanks for the support.
And yes the traceline works on my map all the trace line is implementing is pulling up the boss bar. This is a sign that it is selected if you want to fire you can bastically use a mouse click function off just the trace line and make it attack the traceline_currentTarget. Right now mine is using a seperate mouse click feature but its because I was having problems making it 100% accurate. A traceline function does just this because now you have selected a target on the x-y plane along that line. The code I asked Rrowland for is to actually turn allow you to trace a line on the x-y-z plane.
If you both want to post your most updated code I have no problem looking at it trying to figure out your problem.
Rrowland I have a question for you? How did your trace line to affect a Mutalisk in that first video? I put some air units in the map and I have to aim low still to view their information? A heads up Rrowland I am an Engineer IRL and I have taken alot of physics classes what I meant by basically the friction caused by wind resistance is minimal. When we as humans shoot bullets from the perspective of where the gun is it is impossible to see the speed of the bullet decrease. The biggest objective of this happening is speed decreasing. For the purpose of third person shooters gravity will play a large enough role to stop the bullet and bring it back down.
But you are correct if I really wanted to put physics into the map I could also use wind resistance to decrease the speed of the bullet and possibly arc the trajectory to the left or right if there were wind in that direction. But because a bullet travels starting off at about 250m/s the arc is usually going to be no more or less then a couple inches in either direction.
I appreciate all the help and look forward to discussing this further maybe you could help out with make bullets do the same effect but traveling on that line. That is if your game on helping out a non programmer such as myself.
I think i also know your problem. If you read the code he is setting the Array up using the playernumber instead of using playernumber-1 if your trying so you need to account for this when you try to pull the data from the global variables that are set up. if you want it to start at zero just do the math and your good.
Hey Kanaru take a look at my map it works on there its nothing special but it works. Everything is fully implemented. I have also currently set up a way to alternate between 3rd person to top view. Alot of the stuff is going to be used in my Library I am making and some of it is not being used cause I have modified it. All that you need to know to test it is this hit esc to put the game in 3rd person shooter, then turn till you aim at one of the four units. When you actually target one it will pull up showing their information on a boss bar. The exact way it was shown in reaver madness. If you decide to fire. I was using my own version of a modified x,y coordinate to aim so its not 100% accurate.
I agree but I was also thinking of using it to draw a line for a projectile to follow, I was going to factor in gravity, and I have done some research already and Gravity isn't the same due to scaling of the game. I figure If the average person is about 2 m high it means that a ghost is about .6 of the map scale. this to me means that that is approximately equivalent to 2 meters. That means gravity is closer to a -1 unit per second. As far as wind this might be good in a golf game or if you were sniping at a long distance, but for something fairly close this wont matter. I was also thinking of using this to display information about units and am having no luck with that aspect.
Thanks for this. It helps getting it working Rrowland I am working on adding physics to this because this can be used as a vector for trajectories. So I can add to my library for all map makers I am making. Cause right now if you use this to fire it directly hits the target which is good but it doesn't account for what if the target is moving and you have to lead the target. This is important because that is physically how things should work. I found a guy who wrote some code that uses projectiles to hit targets the dilemma he has is the formula incorrect so the patterns that they use are alright. I intend on take both, also Rrowland I hope your fine with me using this traceline function in my library I am making for the mapping community. I talked to you a little about it when I contacted you on YouTube.