unit stops being within x of unit

Do you need World Editor help? Ask here!
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)
BugMeNot
Posts: 141
Joined: Wed Jan 21, 2009 12:46 pm

unit stops being within x of unit

Unread post by BugMeNot »

Need help guys this is just my concept I had a trigger that if you comes to a unit within 300 range an ability of heal will be added it was successful but I dont know how to make if you leave that unit the ability will be remove what i did was i put another unit in different angle so that if you pass to that unit the ability will be removed... What if the unit teleports??? it will not pass to the triggered unit

--Adrian
Last edited by 3ICE on Sat Mar 24, 2018 11:10 am, edited 1 time in total.
Reason: I stole your question to my website, hope you don't mind http://forum.3ice.hu/viewtopic.php?f=14&t=987
This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: unit stops being within x of unit

Unread post by 3ICE »

Periodically apply a 0.1 sec buff while in range. As soon as you leave 0.1s later it will fall off because it is no longer re-applied by the periodic trigger.

Or every 0.1s check if distance between position of unit1 and position of unit2 > 300. If yes, remove ability and turn off the constant checking
ImageImageImageImageImage
Image
ImageImage

BugMeNot
Posts: 141
Joined: Wed Jan 21, 2009 12:46 pm

Re: unit stops being within x of unit

Unread post by BugMeNot »

Should I used variables for many players or just triggering unit?
I stole your question to my website, hope you don't mind http://forum.3ice.hu/viewtopic.php?f=14&t=987
I dont mind still I'm willing to learn
This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: unit stops being within x of unit

Unread post by 3ICE »

Yeah, neither. Some kind of unit indexing system is recommended for triggered MUI spells. Or at the very least an array of units currently being checked if you prefer to do it by hand.
ImageImageImageImageImage
Image
ImageImage

BugMeNot
Posts: 141
Joined: Wed Jan 21, 2009 12:46 pm

Re: unit stops being within x of unit

Unread post by BugMeNot »

If I used triggering units, what if an enemy approaches that unit he will acquired the healing ability
This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: unit stops being within x of unit

Unread post by 3ICE »

Yes, that's exactly why we don't use triggering unit in periodic triggers
As there's only a timer event, not a unit event available. Triggering unit will be garbage value or null
ImageImageImageImageImage
Image
ImageImage

BugMeNot
Posts: 141
Joined: Wed Jan 21, 2009 12:46 pm

Re: unit stops being within x of unit

Unread post by BugMeNot »

How about unit group?
This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: unit stops being within x of unit

Unread post by 3ICE »

Won't work, how do you decide which unit from the unit group comes within x of which unit from the other group.

(If there are more than one units that check 300 range, that is.)

If you're checking just 1 healing fountain unit, then a pair of groups will work, yes. Units still in range of team 1's fountain. And Units still near team 2's heal fountain for the other group.
ImageImageImageImageImage
Image
ImageImage

BugMeNot
Posts: 141
Joined: Wed Jan 21, 2009 12:46 pm

Re: unit stops being within x of unit

Unread post by BugMeNot »

Allied System?
Then I can use this concept like Lol when you pass to a grass you will become invisible i'll put a blank model in the middle of the grass and if you approach that unit you will be affected by the invisibility effect
This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: unit stops being within x of unit

Unread post by 3ICE »

Regions are more efficient. There are fast "Unit enters" and "Unit exits" region events
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users and 69 guests