I think the whole traceline idea is great. But the problem with it is that we need to create a vector system in order to create a very realistic shooting system.
Right now, what I've been doing is simply using the point that the center of the camera is looking at and create a sniper damage from the main unit to any unit within that point. Now this is the problem, because what happens if you are targeting the head of a unit, but that is actually pointing to a point far far away from the unit's head? Aha see, that is a problem! Hence we need to create a vector system, instead of using the dumb environment effect that blizzard creates, we need to create an actual missile that goes to that point. If the missile hits something, kill it and it will do damage.
This map so far uses a line system, so it is much more accurate than sherardt's way of using circle region at the point clicked. It will create circle regions from main unit to target point and figure out which unit is the closest at that "line". But it doesn't make sense because you can pretty much target at a point beyond an enemy unit and still kill it if u get the angle right... So it does not replace the missile system I'm talking about.
I know in Wc3 you have to deal alot with memory leaks, in particular whenever you create an object lets say a region, you will have to remove it in the end. However, I couldn't find any function for Destroying or Removing a region in sc2. So I'm assuming that wc3 has like a garbage collection system kinda thing?
Thanks for sharing that map, now I can learn how to implement the traceline.
The traceline function never works. Focus on the TargetedUnit, it iterates every 0s, but as you can see the traceline_currentTargetUnit is alwayts null...
I'd like to request an in-depth tutorial of the basics of using the Data Editor. Personally its very hard to migrate from the object editor in Wc3 to the Data editor in Sc2. I don't even know how to set the model and icon of a unit... A tutorial of the Data Editor would be much helpful to I think everyone in here who are new to the galaxy editor.
0
@BeLugh: Go
I'm using global vars becuz I'm creating sort of like structs....
0
I think the whole traceline idea is great. But the problem with it is that we need to create a vector system in order to create a very realistic shooting system.
Right now, what I've been doing is simply using the point that the center of the camera is looking at and create a sniper damage from the main unit to any unit within that point. Now this is the problem, because what happens if you are targeting the head of a unit, but that is actually pointing to a point far far away from the unit's head? Aha see, that is a problem! Hence we need to create a vector system, instead of using the dumb environment effect that blizzard creates, we need to create an actual missile that goes to that point. If the missile hits something, kill it and it will do damage.
This map so far uses a line system, so it is much more accurate than sherardt's way of using circle region at the point clicked. It will create circle regions from main unit to target point and figure out which unit is the closest at that "line". But it doesn't make sense because you can pretty much target at a point beyond an enemy unit and still kill it if u get the angle right... So it does not replace the missile system I'm talking about.
PRESS ESC for the 3rd person view
0
Hi,
I know in Wc3 you have to deal alot with memory leaks, in particular whenever you create an object lets say a region, you will have to remove it in the end. However, I couldn't find any function for Destroying or Removing a region in sc2. So I'm assuming that wc3 has like a garbage collection system kinda thing?
0
@sherardt: Go
Thanks for sharing that map, now I can learn how to implement the traceline.
The traceline function never works. Focus on the TargetedUnit, it iterates every 0s, but as you can see the traceline_currentTargetUnit is alwayts null...
0
@rrowland: Go
How do you do that? Do I have to use the periodic method instead and check where the point is?
0
@OneTwoSC: Go
K, I tried that it works, in fact I don't need the traceline. So what exactly is the point of the traceline?
0
I honestly don't know how to impement this.
Can you enlighten me about how to implement this? I'm trying to make it so that effect spawns on the position where my mouse clicks...
Refer to the map...
0
I'd like to request an in-depth tutorial of the basics of using the Data Editor. Personally its very hard to migrate from the object editor in Wc3 to the Data editor in Sc2. I don't even know how to set the model and icon of a unit... A tutorial of the Data Editor would be much helpful to I think everyone in here who are new to the galaxy editor.