Hi all, thanks for your suggestions. I sort of figured out how to make it work for 1 zergling.
I found a very useful function "Angle between points", which returns the angle from point 1 to point 2 as a real value in degrees. I changed the trigger "Change Marine Angle" accordingly to get this:
It seems like it doesn't make sense, especially this line "Variable - Set angle = (Angle from (Position of (Picked unit)) to (Position of Marine))". Why am I setting the angle between the Zergling and the Marine as the angle for the Marine to turn?
Well, this is something I found that was interesting when I use the Angle between points function with point 1 as the position of Zergling and point 2 as the position of the marine:
Basically the Angle Between Points function sort of returns the opposite angle as compared to Make Unit Face Angle. So with this I sort of found the opposite of an angle. So the map works, but only with 1 zergling.
I don't know how to move on for more than 1 zergling, but I hope you guys will continue to give me advice. Thanks.
Hi, Trieva, thanks for your response. Unfortunately Im not too good at using this map editor. Actually I was doing this earlier and I sort of gave up very quickly as I didn't know how to continue. (I use GUI btw)
This only useful action I found was "Make Unit Face Angle". It makes a unit face an angle that you specify.
A function I found called "Facing angle of unit" gets the facing angle (in a real) of a unit.
What I found interesting was the "angle mechanics". In the terrain editor to change the rotation of any unit you specify an angle between 0 and 360 degrees. The function "Facing angle of unit", however, returns a value of between -180 and 180 degrees. Figured out using a simple trigger:
And the result is a marine looking at the left and gradually turning in anti-clockwise direction. Here's a simple visualisation I made from what I understand:
Here is the trigger Change Marine Angle I made but it doesn't work.
Basically everything is already working correctly and well set, just that I don't know what to set the variable "angle" as and I'm trying to figure it out. Just need to think of some mathematical thing to achieve this...
By the way, this is the "Handle Marine Angle" action definition:
That's all I have. What I'm thinking is that the variable "nearby units angles" is completely useless and probably won't have any use in calculating the variable "angle". I think what I really need is a way to find the zergling's position relative to the marine in terms of angle. Like I need to find a way to get the number 0 when a Zergling is directly on the right of the Marine.
Basically I need the Marine to face the "safest" place, so that later the angle that was used to make the Marine face this position will be very very useful to implement a kiting bot. The factors that will affect where the Marine is facing:
- Number of Zergling(s)
- Position of Zergling(s)
- Distance between Zergling(s) and the Marine (ignore this as a start)
Im using a Windows 7 computer. So i have a Galaxy Editor file in my thumbdrive and whenever I save it (using Ctrl+S), Galaxy Editor will not respond for about 1 minute and I have to wait that 1 minute before I can continue with my work. Anyone else experience this glitch? How do i fix this?
0
Hi all, thanks for your suggestions. I sort of figured out how to make it work for 1 zergling.
I found a very useful function "Angle between points", which returns the angle from point 1 to point 2 as a real value in degrees. I changed the trigger "Change Marine Angle" accordingly to get this:
It seems like it doesn't make sense, especially this line "Variable - Set angle = (Angle from (Position of (Picked unit)) to (Position of Marine))". Why am I setting the angle between the Zergling and the Marine as the angle for the Marine to turn?
Well, this is something I found that was interesting when I use the Angle between points function with point 1 as the position of Zergling and point 2 as the position of the marine:
Basically the Angle Between Points function sort of returns the opposite angle as compared to Make Unit Face Angle. So with this I sort of found the opposite of an angle. So the map works, but only with 1 zergling.
I don't know how to move on for more than 1 zergling, but I hope you guys will continue to give me advice. Thanks.
0
@Trieva: Go
Hi, Trieva, thanks for your response. Unfortunately Im not too good at using this map editor. Actually I was doing this earlier and I sort of gave up very quickly as I didn't know how to continue. (I use GUI btw)
This only useful action I found was "Make Unit Face Angle". It makes a unit face an angle that you specify.
A function I found called "Facing angle of unit" gets the facing angle (in a real) of a unit.
What I found interesting was the "angle mechanics". In the terrain editor to change the rotation of any unit you specify an angle between 0 and 360 degrees. The function "Facing angle of unit", however, returns a value of between -180 and 180 degrees. Figured out using a simple trigger:
And the result is a marine looking at the left and gradually turning in anti-clockwise direction. Here's a simple visualisation I made from what I understand:
Here is the trigger Change Marine Angle I made but it doesn't work.
Basically everything is already working correctly and well set, just that I don't know what to set the variable "angle" as and I'm trying to figure it out. Just need to think of some mathematical thing to achieve this...
By the way, this is the "Handle Marine Angle" action definition:
That's all I have. What I'm thinking is that the variable "nearby units angles" is completely useless and probably won't have any use in calculating the variable "angle". I think what I really need is a way to find the zergling's position relative to the marine in terms of angle. Like I need to find a way to get the number 0 when a Zergling is directly on the right of the Marine.
I hope you can help me :)
0
Does anyone know how to make something like the angle test?
EDIT:
The video's angle test seems a little vague, I think this one seems more in-depth:
Also see this post: http://www.sc2mapster.com/forums/development/triggers/79964-dargleins-marine-ai/#p3 It shows what I have tried and found out.
Basically I need the Marine to face the "safest" place, so that later the angle that was used to make the Marine face this position will be very very useful to implement a kiting bot. The factors that will affect where the Marine is facing:
- Number of Zergling(s)
- Position of Zergling(s)
- Distance between Zergling(s) and the Marine (ignore this as a start)
- Terrain ( also ignore this as a start)
0
@FunkyUserName: Go
Lol troll? Serious...
0
@FunkyUserName: Go
ZZZZZZ...... is there a faster and simpler way...?
0
@FunkyUserName: Go
Sorry, I'm new to dialogs. So which elements and which type of dialog item (is it button, portrait, etc.) do I hookup?
0
Hi all,
Is there a way to change the race of the UI in-game using pure triggers preferably?
For example, how do I change the UI of
to
(ignore the terrain D: )
Or basically how do I change Terran UI to Protoss UI, including the resource symbols.
0
Hi
How do I get the caster of an ability to move towards the target point if the target point is out of range?
Thanks
0
Thanks a lot! Just to clarify, the lower the global time scale, the slower the game?
0
Bump. I need this too. Is there a way to do this only using triggers?
0
Using triggers, how to hide the health bar of a unit? If impossible to do with triggers, how to do it with data?
0
Hi, I tried changing the setting to the other option (smaller files) and there wasnt much difference
0
@Labingo: Go
Thanks, I'll try it later. To answer ur questions:
- The project file isnt that large, even if I dont modify any data, it stills take a LOOOONG time to load
- Maps in general take long to save...
- Using a Core i3 Windows 7 computer
0
@Labingo: Go
Thanks for your reply, but when I save it to my computer (not thumbdrive) this problem still remains...
0
Im using a Windows 7 computer. So i have a Galaxy Editor file in my thumbdrive and whenever I save it (using Ctrl+S), Galaxy Editor will not respond for about 1 minute and I have to wait that 1 minute before I can continue with my work. Anyone else experience this glitch? How do i fix this?