Okay so my issues are twofold, one is about what I'm trying to currently do (and have given up after staying up till 6am to figure out), and another more general question.
First
1) I need a way to tell if a particular unit comes within a certain radius of ANY UNIT owned by a certain player. I tried many permutations of triggers within the editor, but I have run out of leads. This trigger needs to be able to deal with any unit currently existing or spawned in the future.
Second
2) I can't for the life of me find proper starting resources for the advanced scripting/programming in this damn editor.
Okay so, first, I get it, I can program my own thing. But do I build upon existing functions? This isn't exactly like I can just pull ASM code here, surely there are built-in hooks to determine things like "owned by" or whatever. I can't FOR THE LIFE OF ME determine where I can find all of these functions, let alone determine what they all do.
I know a fair bit of custom maps are coming out or are already out, and it blows my mind that people have already found out that much about the advanced scripting when I am having such difficulty finding an all-encompassing resource.
So, to re-cap.
I would like someone to point me to the following, please. Or at least explain some things to me I might be missing:
-A full reference guide to all the functions I can call when scripting (or at least how to find such a resource)
-How on earth I can find a proper syntax documentation on this
-Anything else I need to start actually learning the language instead of just having to decyper the whole damn thing from reading every single piece of code on this site
It blows my mind it's so hard to find how to properly do this. All I keep finding is either short or incomplete "how-to's" of single-use concepts. As opposed to how to actually program within the language. And yes, I did try google, countless times.
Okay so my issues are twofold, one is about what I'm trying to currently do (and have given up after staying up till 6am to figure out), and another more general question.
First
1) I need a way to tell if a particular unit comes within a certain radius of ANY UNIT owned by a certain player. I tried many permutations of triggers within the editor, but I have run out of leads. This trigger needs to be able to deal with any unit currently existing or spawned in the future.
Second
2) I can't for the life of me find proper starting resources for the advanced scripting/programming in this damn editor.
Okay so, first, I get it, I can program my own thing. But do I build upon existing functions? This isn't exactly like I can just pull ASM code here, surely there are built-in hooks to determine things like "owned by" or whatever. I can't FOR THE LIFE OF ME determine where I can find all of these functions, let alone determine what they all do.
I know a fair bit of custom maps are coming out or are already out, and it blows my mind that people have already found out that much about the advanced scripting when I am having such difficulty finding an all-encompassing resource.
So, to re-cap.
I would like someone to point me to the following, please. Or at least explain some things to me I might be missing:
-A full reference guide to all the functions I can call when scripting (or at least how to find such a resource) -How on earth I can find a proper syntax documentation on this -Anything else I need to start actually learning the language instead of just having to decyper the whole damn thing from reading every single piece of code on this site
It blows my mind it's so hard to find how to properly do this. All I keep finding is either short or incomplete "how-to's" of single-use concepts. As opposed to how to actually program within the language. And yes, I did try google, countless times.
Please help me, I'm at wit's end!
Well I feel for you staying up till 6 am mapping, I did that too. Except at the end I ran into a problem I could not figure out and just gave up and actually started playing melee. :)
4 people rushing one person turns out to be quite fun.
for 1 :
Can´t check, because i can´t start the editor at the moment (EU...)
But you could give particular unit an Aura, that effects only enemy units, and applys an hidden dummy behaviour within Range X (periodic effect- Search Area and so on... ) . I think there was some "unit has behaviour" comparison, combine that with a 0,5 periodic event trigger, and you got it ;)
What you need to do is just have a fast periodic event ("every .02 seconds of game time") <-50fps loop through each unit, and check the distance.
If you want to make it faster, just check the SQUARE distance, so you don't need to perform the costly square root operation. Write your own function that takes two points, and use the pythagorean theorem to determine the square distance (same as distance formula, just no square root).
What you need to do is just have a fast periodic event ("every .02 seconds of game time") <-50fps loop through each unit, and check the distance. If you want to make it faster, just check the SQUARE distance, so you don't need to perform the costly square root operation. Write your own function that takes two points, and use the pythagorean theorem to determine the square distance (same as distance formula, just no square root).
Hi Lazy,
I would LOVE to write my own functions and stuff, but I can't find any documentation outlining how to do that. I understand the concept, but I don't know all the functions I can call on in SC2 to make my own function. That's most of what my Part2 is about.
As for GUI Editor I am very good with it, since I've been mapping since the release of Starcraft I and Warcraft III.
CopytoTextIn-RangeofUnitownedbyPlayerEventsUnit-AnyUnitEntersadistanceof1.0fromUnit2// This is a event and always fires off when Any unit enters range of Unit 2. Conditions are determined if the actions should fire if Conditions are met. Such as the next one.Conditions(Ownerof(Triggeringunit))==1// This is the player number 1 = red; 2 = blue and so forth.ActionsYouractionshere.
As for GUI Editor I am very good with it, since I've been mapping since the release of Starcraft I and Warcraft III.
CopytoTextIn-RangeofUnitownedbyPlayerEventsUnit-AnyUnitEntersadistanceof1.0fromUnit2// This is a event and always fires off when Any unit enters range of Unit 2. Conditions are determined if the actions should fire if Conditions are met. Such as the next one.Conditions(Ownerof(Triggeringunit))==1// This is the player number 1 = red; 2 = blue and so forth.ActionsYouractionshere.
Thanks! Looks like I have more to learn about how conditions can help me.
Okay so my issues are twofold, one is about what I'm trying to currently do (and have given up after staying up till 6am to figure out), and another more general question.
First
1) I need a way to tell if a particular unit comes within a certain radius of ANY UNIT owned by a certain player. I tried many permutations of triggers within the editor, but I have run out of leads. This trigger needs to be able to deal with any unit currently existing or spawned in the future.
Second
2) I can't for the life of me find proper starting resources for the advanced scripting/programming in this damn editor.
Okay so, first, I get it, I can program my own thing. But do I build upon existing functions? This isn't exactly like I can just pull ASM code here, surely there are built-in hooks to determine things like "owned by" or whatever. I can't FOR THE LIFE OF ME determine where I can find all of these functions, let alone determine what they all do.
I know a fair bit of custom maps are coming out or are already out, and it blows my mind that people have already found out that much about the advanced scripting when I am having such difficulty finding an all-encompassing resource.
So, to re-cap.
I would like someone to point me to the following, please. Or at least explain some things to me I might be missing:
-A full reference guide to all the functions I can call when scripting (or at least how to find such a resource) -How on earth I can find a proper syntax documentation on this -Anything else I need to start actually learning the language instead of just having to decyper the whole damn thing from reading every single piece of code on this site
It blows my mind it's so hard to find how to properly do this. All I keep finding is either short or incomplete "how-to's" of single-use concepts. As opposed to how to actually program within the language. And yes, I did try google, countless times.
Please help me, I'm at wit's end!
Well I feel for you staying up till 6 am mapping, I did that too. Except at the end I ran into a problem I could not figure out and just gave up and actually started playing melee. :)
4 people rushing one person turns out to be quite fun.
for 1 : Can´t check, because i can´t start the editor at the moment (EU...) But you could give particular unit an Aura, that effects only enemy units, and applys an hidden dummy behaviour within Range X (periodic effect- Search Area and so on... ) . I think there was some "unit has behaviour" comparison, combine that with a 0,5 periodic event trigger, and you got it ;)
and here i thought there was a solution to my thinning hair in this thread... what a disappointment...
So uhh about that programming... any hot leads on that? :/
@BloodyIron: Go
Well, you won't be able to do that with an event.
What you need to do is just have a fast periodic event ("every .02 seconds of game time") <-50fps loop through each unit, and check the distance. If you want to make it faster, just check the SQUARE distance, so you don't need to perform the costly square root operation. Write your own function that takes two points, and use the pythagorean theorem to determine the square distance (same as distance formula, just no square root).
Hi Lazy,
I would LOVE to write my own functions and stuff, but I can't find any documentation outlining how to do that. I understand the concept, but I don't know all the functions I can call on in SC2 to make my own function. That's most of what my Part2 is about.
Can you help me on this please?
Thanks!
Okay so I found the following link: http://www.sc2mapster.com/api-docs/functions/
I'll contact one of the authors of it.
I'm also going to look into seeing if that aura idea can work for me.
Thanks for the help!
@BloodyIron: Go
As for GUI Editor I am very good with it, since I've been mapping since the release of Starcraft I and Warcraft III.
Try gluing is back on.. I did that with my pubes once.. Didn't really work for me but who knows for u..
(PS incase you couldnt tell i only read the title :p)
My hair is as lush as Bel'shir itself, both up here, and down there.
Bump.
Thanks! Looks like I have more to learn about how conditions can help me.
This resolved my issue.