Hey,
I need help making a trigger in which a unit attacks the structure and when the structure reaches a certain health it transfers control of the structure to the attacking player and resets the structure's health points to normal. Example: Broken Alliances bases if captured...
Thanks, loopsnhoops
Unit give control and reset health trigger
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
-
- Posts: 5
- Joined: Sat Apr 23, 2011 9:56 am
- 3ICE
- Admin
- Posts: 2629
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Unit give control and reset health trigger
Event - Castle 0001 Takes damage
Condition: Castle Life less than 20% of Castle max life
Action: Unit - Change owner of Castle to Owner of Attacking unit
Action: Unit - Set HP of Castle fo Max HP of Castle.
gg :)
Condition: Castle Life less than 20% of Castle max life
Action: Unit - Change owner of Castle to Owner of Attacking unit
Action: Unit - Set HP of Castle fo Max HP of Castle.
gg :)
-
- Posts: 5
- Joined: Sat Apr 23, 2011 9:56 am
Re: Unit give control and reset health trigger
This is good code but can I do the same thing for unit types?
Thanks, loopsnhoops
Thanks, loopsnhoops
- 3ICE
- Admin
- Posts: 2629
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Unit give control and reset health trigger
Yes.
Switch to Any unit takes damage and pray to (whatever deity you believe in) your map doesn't lag too bad from that lazy approach.
And of course swap every instance of "Castle 0001" to "Triggering unit".
Switch to Any unit takes damage and pray to (whatever deity you believe in) your map doesn't lag too bad from that lazy approach.
And of course swap every instance of "Castle 0001" to "Triggering unit".
Who is online
Users browsing this forum: Bing [Bot] and 324 guests