These are screen coordinate lines for the interface. I haven't found a way to draw good looking lines in 3D yet, but I think Beam Actors would be the way to go.
This is a more flexible way to do it using a custom action (useful if you want to draw lines in dialogs):
CreatealinefordialogOptions:ActionReturnType:(None)ParametersDialog=(Lastcreateddialog)<Dialog>x0=0<Integer>y0=0<Integer>x1=0<Integer>y1=0<Integer>thickness=1<Integer>Color=(100%,100%,100%)<Color>GrammarText:Createalinefordialog(Dialog)from(x0,y0)to(x1,y1)usingthicknessthicknessandcolorColorHintText:(None)CustomScriptCodeLocalVariablesdx=0.0<Real>dy=0.0<Real>xm=0<Integer>ym=0<Integer>length=0.0<Real>angle=0<Integer>ActionsVariable-Setdx=(Real((x1-x0)))Variable-Setdy=(Real((y1-y0)))------- The length of the lineVariable-Setlength=(Squareroot(((dx^2.0)+(dy^2.0))))------- Find the middle of the lineVariable-Setxm=(Integer((((Real(x0))+(Real(x1)))/2.0)))Variable-Setym=(Integer((((Real(y0))+(Real(y1)))/2.0)))------- The angle of the lineVariable-Setangle=(Integer((Atan2(dx,dy))))Dialog-CreateanimagefordialogDialogwiththedimensions((Integer(length)),thickness)anchoredtoTopLeftwithanoffsetof((xm-((Integer(length))/2)),(ym-(thickness/2)))settingthetooltipto""usingtheimageAssets\Textures\dot.DDSasaNormaltypewithtiledsettofalsetintcolorColorandblendmodeNormalDialog-Set(Lastcreateddialogitem)rotationtoanglefor(Allplayers)
Now I think I got it. It isn't perfectly optimized, but it should be A LOT faster than the previous method. And it looks nearly perfect in my opinion. You can adjust thickness, color and show/hide single lines or even remove them completely.
DrawLineOptions:FunctionReturnType:DialogParametersPlayergroup=(Emptyplayergroup)<PlayerGroup>x0=0<Integer>y0=0<Integer>x1=0<Integer>y1=0<Integer>thickness=0<Integer>Color=Black<Color>GrammarText:DrawLine(Playergroup,x0,y0,x1,y1,thickness,Color)HintText:(None)CustomScriptCodeLocalVariablesdx=0.0<Real>dy=0.0<Real>xm=0<Integer>ym=0<Integer>length=0.0<Real>angle=0<Integer>ActionsDialog-CreateaModaldialogofsize(500,400)at(0,0)relativetoCenterofscreenDialog-Set(Lastcreateddialog)tobefullscreentrueDialog-Hidethebackgroundimageof(Lastcreateddialog)Variable-Setdx=(x1-x0)Variable-Setdy=(y1-y0)------- The length of the lineVariable-Setlength=(Squareroot(((dx^2.0)+(dy^2.0))))------- Find the middle of the lineVariable-Setxm=(Integer((((Real(x0))+(Real(x1)))/2.0)))Variable-Setym=(Integer((((Real(y0))+(Real(y1)))/2.0)))------- The angle of the lineVariable-Setangle=(Integer((Atan2(dx,dy))))Dialog-Createanimagefordialog(Lastcreateddialog)withthedimensions((Integer(length)),thickness)anchoredtoTopLeftwithanoffsetof((xm-((Integer(length))/2)),(ym-(thickness/2)))settingthetooltipto""usingtheimageAssets\Textures\dot.DDSasaNormaltypewithtiledsettofalsetintcolorColorandblendmodeNormalDialog-Set(Lastcreateddialogitem)rotationtoangleforPlayergroupDialog-Show(Lastcreateddialog)forPlayergroupGeneral-Return(Lastcreateddialog)
Today I imagined how it could be possible to draw lines on the screen, because as far as I know there is no such function in the editor.
My first attempt was using screen images. Because they are limited to 50, this was no option. I then switched over to dialogs.
This is how it works (looks a bit ugly at the moment, because of rounding errors):
With this method, it is possible to store a line in a dialog variable and show/hide/destroy specific lines.
The result could look better (less crippled) using the bresenham algorithm. Because I use circles, these lines could look really good. A radial gradient would even make smooth lines possible.
Another idea would be to store a line in an image and scale/rotate that according to the coordinates. That may give the best looking results and the best performance.
Has anyone already been experimenting with such things?
@uiasdnmb: Killing Player works just fine (see my example map).
Having copies of triggers is always a bad idea to start with. Every instance of redundancy is bad imho if it can be easily avoided. If you have 9 (more or less) equal triggers and you want to change a little thing, you will have to change all 9 triggers and if you forget one of them, you will never find the error.
You want to know, which player has the most kills? Here is the way to do it:
I think, the problem is, that below the bridge, there is a big black hole. This hole then gets filled by the background color and results in this strange rectangle. But I have no plan how to put terrain below the bridge, so you won't see the hole. Or is there a better way?
In my map, i placed a bridge (Castanar Bridge Horizontal Large) via the terrain object tool. Everything works and looks fine, except a strange bug.
There is a strange bright rectangle under the bridge. I have marked it on a screenshot:
0
@gizmachu: Go
Imho this is the "right" way to do this, except the multiple calculation of
Better to use a variable here. It is more efficient, easier to read and less error-prone.
0
These are screen coordinate lines for the interface. I haven't found a way to draw good looking lines in 3D yet, but I think Beam Actors would be the way to go.
This is a more flexible way to do it using a custom action (useful if you want to draw lines in dialogs):
Usage:
0
btw (sry for digging this up): Does Blizzard allow you to edit and republish their maps?
0
Now I think I got it. It isn't perfectly optimized, but it should be A LOT faster than the previous method. And it looks nearly perfect in my opinion. You can adjust thickness, color and show/hide single lines or even remove them completely.
0
Hello,
Today I imagined how it could be possible to draw lines on the screen, because as far as I know there is no such function in the editor. My first attempt was using screen images. Because they are limited to 50, this was no option. I then switched over to dialogs. This is how it works (looks a bit ugly at the moment, because of rounding errors):
With this method, it is possible to store a line in a dialog variable and show/hide/destroy specific lines.
The result could look better (less crippled) using the bresenham algorithm. Because I use circles, these lines could look really good. A radial gradient would even make smooth lines possible.
Another idea would be to store a line in an image and scale/rotate that according to the coordinates. That may give the best looking results and the best performance.
Has anyone already been experimenting with such things?
0
By custom decals, you mean doodads?
0
yours is shorter ;)
0
You could also try giving the Zergling multiple instructions by using "After Existing Orders".
0
@Magnum22: Go
0
@uiasdnmb: Killing Player works just fine (see my example map).
Having copies of triggers is always a bad idea to start with. Every instance of redundancy is bad imho if it can be easily avoided. If you have 9 (more or less) equal triggers and you want to change a little thing, you will have to change all 9 triggers and if you forget one of them, you will never find the error.
You want to know, which player has the most kills? Here is the way to do it:
0
Store all your regions in an array and loop through them.
0
@Polantaris: Go
It's maybe because you are using "Last Created Leaderboard", which is not defined at that point.
Here is a small example map with a working kill counter:
0
Showing the terrain cells at the border makes it look a bit better, because it is hard to see whats under water. But isn't there another way?
EDIT: Now it looks acceptable. I used the "Show Terrain Cells" Tool and covered the edges with rocks.
0
I think, the problem is, that below the bridge, there is a big black hole. This hole then gets filled by the background color and results in this strange rectangle. But I have no plan how to put terrain below the bridge, so you won't see the hole. Or is there a better way?
0
Hello,
In my map, i placed a bridge (Castanar Bridge Horizontal Large) via the terrain object tool. Everything works and looks fine, except a strange bug. There is a strange bright rectangle under the bridge. I have marked it on a screenshot:
http://img810.imageshack.us/i/bridgebug.jpg/
Is there a way to fix this?
Thanks in advance.