Hey everyone seems when I searched the forum for an answer all I got was Attachment Points. However that is not what I am talking about. This may need to get moved to AI Development.
My Question
How, using triggers, can I attach a point to a unit?
Background Story
If your interested
I need to attach a point to a unit. The reason for this is to create a accurate target for the AI. The game I'm making evolves triggers activating preset waves in the AI Module. Now I realize you can attach point to a unit that's created in Terrain Module but since I'm creating units through triggers I can't use this option.
I've attached pictures below of the points I want to attach to a unit.
I've also attached a picture of the method I talked about above in 'Background Story'
The best way to do this would be the create a Small circle region. Like .1 And attach it to the unit. Then move the point you want to keep with your unit the the center of the region through a periodic trigger.
Have you tried creating a custom action definition based off of the Attach Region to Unit?
Perhaps if you find it in the Blizzard library and create one called Attach Point to Unit and change the Parameter Region it might work?
Just a thought don't know if it will work.
Also a little unsure but even if you use the attach point/region it will still need to be update every few seconds
Another solution is perhaps putting the unit in a unit group and looping through each unit and getting the units X and Y coordinates from there
Perhaps with a little more clarification i can provide more possible solutions
True mine uses an extra step, but if he gets rid of the region and just periodically moves it to the position of the unit say every .0625 secs then he's fine unless he has a mass amount of periodic triggers already it won't mess him up too much.
Also why not just use the position of the unit of the unit for the ai target now that I think about it. I mean it's the same coordinates you're asking for and it'd be a lot quicker.
Hmm I'll look into these later. I'll post again once I have finished working on all the suggestions. Thanks
Update:=== (12 FEB 2013)
I've looked into the region attachment method and while doing so ended up creating a custom AI through triggers. Once I've finished polishing it i'll post what I did here. I would still like to know if there is a easy way to attach a point to a unit through triggers.
Second Update=== (16 FEB 2013)
Finished the AI for now. I'll post what I did soon.
How to Attach a Point to a Unit
Hey everyone seems when I searched the forum for an answer all I got was Attachment Points. However that is not what I am talking about. This may need to get moved to AI Development.
My Question
How, using triggers, can I attach a point to a unit?
Background Story
If your interested I need to attach a point to a unit. The reason for this is to create a accurate target for the AI. The game I'm making evolves triggers activating preset waves in the AI Module. Now I realize you can attach point to a unit that's created in Terrain Module but since I'm creating units through triggers I can't use this option.
I've attached pictures below of the points I want to attach to a unit.
I've also attached a picture of the method I talked about above in 'Background Story'
The best way to do this would be the create a Small circle region. Like .1 And attach it to the unit. Then move the point you want to keep with your unit the the center of the region through a periodic trigger.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Have you tried creating a custom action definition based off of the Attach Region to Unit?
Perhaps if you find it in the Blizzard library and create one called Attach Point to Unit and change the Parameter Region it might work?
Just a thought don't know if it will work.
Also a little unsure but even if you use the attach point/region it will still need to be update every few seconds
Another solution is perhaps putting the unit in a unit group and looping through each unit and getting the units X and Y coordinates from there
Perhaps with a little more clarification i can provide more possible solutions
True mine uses an extra step, but if he gets rid of the region and just periodically moves it to the position of the unit say every .0625 secs then he's fine unless he has a mass amount of periodic triggers already it won't mess him up too much.
@gamemore: Go
Also why not just use the position of the unit of the unit for the ai target now that I think about it. I mean it's the same coordinates you're asking for and it'd be a lot quicker.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Hmm I'll look into these later. I'll post again once I have finished working on all the suggestions. Thanks
Update:=== (12 FEB 2013)
I've looked into the region attachment method and while doing so ended up creating a custom AI through triggers. Once I've finished polishing it i'll post what I did here. I would still like to know if there is a easy way to attach a point to a unit through triggers.
Second Update=== (16 FEB 2013)
Finished the AI for now. I'll post what I did soon.