• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Detect Spell

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
I'm trying to do a spell that detects if a unit comes near your unit by 1500 range.

The spell is a passive one, based in truesight that have 900 range. But i wanna that it also ping in minimap (Only for you) if any units come within 1500 range of you.

I tried some ways, but seems that don't have a nice way to do that...
All the ways I thought would increase lag ingame. (periodic event, checks if unit is issued order...)
 
Level 12
Joined
Mar 23, 2008
Messages
942
Does it need to be any unit, or a specific one ?
Any unit that comes in range of Inuyasha

If it needs to be a specific one, make the trigger without any event, then in another trigger add the event. This allows you to use a variable.
You cannot use variable to the event, so you cannot add:
Unit - unit comes within 1500 range of xxx
xxx = Inuyasha

So this only works for unit that as already placed in world editor.

If it needs to be any unit, you'll need to use a periodic event.
Lag.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
That's because variables represent a value, so when you put in a variable, it subs in the current value thereof. Since at map initialization that value is null, GUI prevents you from doing it since

  • It would cause bugs
  • Many would not understand why it didn't work

And you don't need a periodic trigger - you can just create a dynamic trigger for the time it's needed.
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
you can add Events using triggers saishy, with variables becoming specific units

you should know though, once the Event has been created, its unchangable(meaning, changing the variable will not change ´the even) and its undestroyable
 
Level 12
Joined
Mar 23, 2008
Messages
942
you can add Events using triggers saishy, with variables becoming specific units

you should know though, once the Event has been created, its unchangable(meaning, changing the variable will not change ´the even) and its undestroyable
This is a problem... if the player choose Inuyasha and them repick, the other hero will have that ability...

I need a better way :(

Edit: Can I make a dynamic region that follows a unit?
 
Status
Not open for further replies.
Top