I seemingly have trouble getting the most basic concepts to work.
Here's what I'm trying to do:
Create a variable region
Attach this region to a unit (call this "unit B")
Create this trigger:
Event: another unit ("unit A") enters the region attached to "unit B" (this is the part that seems broken)
Action: kill "unit B" by killing "unit attached to region (works when tested with key press event)
Here is my event:
Unit - Zergling [10.42, 18.92] Enters (Region((Center of TestRegion), 5.0))
It doesn't seem like I can just make it "Enters 'Test Region'" either. It doesn't let me pick a variable region. I had to first "Convert Circle to Region" and then use my TestRegion as the "Center of Region", which seems to defeat the point of it being its own region... In any case, this event is failing to work.
It doesn't seem like I can just make it "Enters 'Test Region'" either. It doesn't let me pick a variable region. I had to first "Convert Circle to Region" and then use my TestRegion as the "Center of Region", which seems to defeat the point of it being its own region... In any case, this event is failing to work.
You can make a simple "[unit] Enters 'region' " event by opening up the menu of 'region: convert circle to region' and clicking on the value button and selecting the region you want to use.
but my region can't be a value because it's a variable. The only regions that are values are those that are already placed on the map. These don't account for regions that will be dynamically created an attached to units. These regions must be 'region' variables.
Hmm. Still would like to figure this one out. It's basically a way of doing collision detection. Though I'll probably try to find a way to do it in the data editor.
Hey, you should take a look at my tutorial, it might cover your application.
Basically, you would just have to create a constant empty region, add any variable regions you want to it, and manage everything in the Trigger with the constant Region.
I did not try this mechanism with moving regions, so let me know if anything goes wrong !
edit: Oh and by the way, would it be more simple to create an aura on your unit A that kills unit B ? There's a tutorial for auras out there if you need it.
Insta-kill death aura? Yeah, that was actually what I was going to do if I couldn't figure this out. Thought regions would be easier overall because I could quickly manipulate region size depending on the unit I'm attached it to, effectively and quickly changing its collision size. If it isn't obvious, the collision I'm getting at is simple "good guy running into bad guys means you die".
But I'll take a look at your tutorial. From what I read here, it sounds like an interesting work around. I hadn't realized yet that you can add regions to others through triggers, but it doesn't surprise me. I'm not sure if I'll be able to singly attach one part of a region to a unit though, and one that moves at that.
Do you have a link for any of these "death aura" tutorials? I could figure it out on my own from Bifuu's speed aura tutorial if there aren't any.
I seemingly have trouble getting the most basic concepts to work.
Here's what I'm trying to do:
Here is my event:
Unit - Zergling [10.42, 18.92] Enters (Region((Center of TestRegion), 5.0))
It doesn't seem like I can just make it "Enters 'Test Region'" either. It doesn't let me pick a variable region. I had to first "Convert Circle to Region" and then use my TestRegion as the "Center of Region", which seems to defeat the point of it being its own region... In any case, this event is failing to work.
You can make a simple "[unit] Enters 'region' " event by opening up the menu of 'region: convert circle to region' and clicking on the value button and selecting the region you want to use.
@PoisonHunter: Go
but my region can't be a value because it's a variable. The only regions that are values are those that are already placed on the map. These don't account for regions that will be dynamically created an attached to units. These regions must be 'region' variables.
Does attaching a region to a unit automatically moves the region along with the unit the region is attached to?
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
@GnaReffotsirk: Go
Yes.
Hmm. Still would like to figure this one out. It's basically a way of doing collision detection. Though I'll probably try to find a way to do it in the data editor.
@HeroicPrinny: Go
Hey, you should take a look at my tutorial, it might cover your application.
Basically, you would just have to create a constant empty region, add any variable regions you want to it, and manage everything in the Trigger with the constant Region.
I did not try this mechanism with moving regions, so let me know if anything goes wrong !
edit: Oh and by the way, would it be more simple to create an aura on your unit A that kills unit B ? There's a tutorial for auras out there if you need it.
@Moooyaah: Go
Insta-kill death aura? Yeah, that was actually what I was going to do if I couldn't figure this out. Thought regions would be easier overall because I could quickly manipulate region size depending on the unit I'm attached it to, effectively and quickly changing its collision size. If it isn't obvious, the collision I'm getting at is simple "good guy running into bad guys means you die".
But I'll take a look at your tutorial. From what I read here, it sounds like an interesting work around. I hadn't realized yet that you can add regions to others through triggers, but it doesn't surprise me. I'm not sure if I'll be able to singly attach one part of a region to a unit though, and one that moves at that.
Do you have a link for any of these "death aura" tutorials? I could figure it out on my own from Bifuu's speed aura tutorial if there aren't any.
@HeroicPrinny: Go
Hey, I just tried to apply my workaround for your case on a test map, and guess what? It was working fine ;D
And it's actually more straightforward than what my tutorial covers:
You just need to define a global variable Region, set it as a constant with an initialization to Empty Region (in the function subcategory).
Then:
and in the Trigger:
And I'm walking around killing marines with a zealot !
Sounds really stupid to use a constant as a workaround for a variable, but, hey, it works :)
As for the aura part, I was thinking of the Bifuu's tutorial as well, so I can't really help more :p
edit
http://forums.sc2mapster.com/development/map-development/730-how-to-create-an-aura/
here is another aura tutorial.
did not see auras already have been mentioned^^
@b0ne123: Go
already told, and not easier than triggers.