You will need to play around with validators. So that only if the targeted unit does not have the spell shield behaviour it is effected, but you will need to add this to all spells you plan on having negated by this.
First of all how does this ever fall in?
General - If (Conditions) then do (Actions) else do (Actions)
If
(Camera Height + Trace Height) <= 0.0
Then
Variable - Set traceline_CurrentTarget[Player] = Closest Unit
Variable - Set traceline_CurrentTargetPoint[Player] = Trace Point
Variable - Set traceline_CurrentTargetHeight[Player] = (Camera Height + Trace Height)
And Variable - Set Unit World Height = ((Unit type of Closest Unit) Height) should be Variable - Set Unit World Height = (Ground height at Position of Closest Unit). I also don't know why you replaced the while loop Trace Distance < 50.0 for a for each integer loop.
There are a couple of more things but I think you should recheck rrowlands tutorial (where I suspect you took most of the parts from) and make the script the same as his. The unit max height you can just set through a simple if then else loop. If Unit Type = [Insert Name Here] set variable Unit Max Height = whichever max height value you want.
Maybe it is the mouse click unit commands that take less time and not the command card ones. The delay from the trigger way also becomes increasingly higher the more players there are in the game. Also I don't think that data based movement system needs to be a direct representation to the delay when using the command card as there are other factors involved.
Progammers way suffers from lag from all the units. Top down shooters need it so that the unit always faces the mouse cursor and so that you can have a hold in shooting and movement system instead of a spam-clicking system.
They will be reducing the delay on both key pressed and mouse clicked events so that they match the responsiveness of using the command card and issuing orders to units via mouse click. It will have a large effect on the responsiveness and feel of WASD controls.
0
@xf11: Go
Amount of minerals a player has can be gotten by checking the player property minerals.
0
@SouLCarveRR:
Covering the whole map in units creates a large amount of lag.
0
<<reply 184978>>
So the function you had looked exactly like this?
while(lv_traceDistance < 50.0) {
if(lv_pitch < 90){
lv_traceHeight = Tan(lv_pitch) * lv_traceDistance * (-1);
} else if(lv_pitch > 270) {
lv_traceHeight = Tan(360 - lv_pitch) * lv_traceDistance;
}
lv_tracePoint = PointWithOffsetPolar(lp_cameraPosition, lv_traceDistance, lv_yaw);
lv_traceWorldHeight = WorldHeight(c_heightMapGround, lv_tracePoint);
lv_traceRegion = RegionCircle(lv_tracePoint, 1.5);
lv_closestUnit = libNtve_gf_ClosestUnitToPoint(lv_tracePoint, UnitGroup(null, 15, lv_traceRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
lv_unitRegion = RegionCircle(UnitGetPosition(lv_closestUnit), UnitGetPropertyFixed(lv_closestUnit, c_unitPropRadius, true));
lv_unitWorldHeight = WorldHeight(c_heightMapGround, UnitGetPosition(lv_closestUnit));
if(lv_closestUnit != null &&
lv_closestUnit != gv_mainUnit &&
RegionContainsPoint(lv_unitRegion, lv_tracePoint) &&
lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight >= 0.0 &&
lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight <= UnitGetPropertyFixed(lv_closestUnit, c_unitPropRadius, true)) {
gv_traceline_currentTarget[lp_player] = lv_closestUnit;
gv_traceline_currentTargetPoint[lp_player] = lv_tracePoint;
gv_traceline_currentTargetHeight[lp_player] = lp_cameraHeight + lv_traceHeight;
return;
}
if(lp_cameraHeight + lv_traceHeight <= lv_traceWorldHeight) {
gv_traceline_currentTarget[lp_player] = null;
gv_traceline_currentTargetPoint[lp_player] = lv_tracePoint;
gv_traceline_currentTargetHeight[lp_player] = lp_cameraHeight + lv_traceHeight;
return;
}
lv_traceDistance += 0.5;
}
gv_traceline_currentTarget[lp_player] = null;
gv_traceline_currentTargetPoint[lp_player] = null;
gv_traceline_currentTargetHeight[lp_player] = 0.0;
And you are sure you entered the camera height as the ground height plus whatever the height offset for the camera is?
0
@ndudz: Go
You will need to play around with validators. So that only if the targeted unit does not have the spell shield behaviour it is effected, but you will need to add this to all spells you plan on having negated by this.
0
@Beffyman: Go
In which way doesn't it work like it should?
0
@Beffyman: Go
That is just restrictive. Anyway I suggest you to check through rrowlands tutorial again.
0
@Beffyman: Go
Sorry, my mistake.
0
@Splashy5
First of all how does this ever fall in?
General - If (Conditions) then do (Actions) else do (Actions)
If
(Camera Height + Trace Height) <= 0.0
Then
Variable - Set traceline_CurrentTarget[Player] = Closest Unit
Variable - Set traceline_CurrentTargetPoint[Player] = Trace Point
Variable - Set traceline_CurrentTargetHeight[Player] = (Camera Height + Trace Height)
And Variable - Set Unit World Height = ((Unit type of Closest Unit) Height) should be Variable - Set Unit World Height = (Ground height at Position of Closest Unit). I also don't know why you replaced the while loop Trace Distance < 50.0 for a for each integer loop.
There are a couple of more things but I think you should recheck rrowlands tutorial (where I suspect you took most of the parts from) and make the script the same as his. The unit max height you can just set through a simple if then else loop. If Unit Type = [Insert Name Here] set variable Unit Max Height = whichever max height value you want.
0
@progammer: Go
Alright.
0
@BumpInTheNight: Go
Maybe it is the mouse click unit commands that take less time and not the command card ones. The delay from the trigger way also becomes increasingly higher the more players there are in the game. Also I don't think that data based movement system needs to be a direct representation to the delay when using the command card as there are other factors involved.
0
@SouLCarveRR: Go
You can't convert a player's name to a string as there is no text to string function.
0
@SouLCarveRR: Go
Progammers way suffers from lag from all the units. Top down shooters need it so that the unit always faces the mouse cursor and so that you can have a hold in shooting and movement system instead of a spam-clicking system.
0
@crazyfingers619: Go
They will be reducing the delay on both key pressed and mouse clicked events so that they match the responsiveness of using the command card and issuing orders to units via mouse click. It will have a large effect on the responsiveness and feel of WASD controls.
0
@s3rius: Go
A large possibility, but they haven't implemented or announced anything precise yet so no one can draw any real conclusions at the moment.
0
@s3rius: Go
If it's server based than it should be fairly secure (with the user not able to see or touch them). It is still good news though.