| 05-10-2006, 07:42 AM | #1 |
Sorry to post so many messages lately, I'm excited about this map I'm working on. Ok, to my question. When using the event: Unit - A unit comes within xxrange of xxunit, you are only limited to units already placed on the map. I want to make it so a unit is created on the map, stored in a local variable, and attack any units that come within range of it. The problem is by default, only placed units can be selected. Player heroes will have a small flyer follow them around, and attack units that spawn automatically. Before I used two triggers to accomplish this when I first started the map, but now I can't have any player units already on the map. The second trigger uses the unit I want in the event. Trigger: Trigger: Not a great trigger, but it worked. The second part was much different, using units already on the map. The dragon followed the hero around, attacked, and kept up with it. PlayerFollower(1-12) are the units I want the dragon attack when they come in range, but can't seem to figure out another way to issue the order. Mainly because I can't use variable in events. Any ideas? Knowing this would also help me to make a spell trigger that requires a unit to come within range of lets say a frisbee, and know that they have collided to deal the damage. BTW. If anyone is interested with what kind of map I'm trying to create here, follow this link: http://bmgcl.emuxhaven.net/projects.htm Just scroll down to the very bottom. The ideas and the map itself are still very primitive, but so far it's coming along nicely. |
| 05-10-2006, 07:48 AM | #2 |
You can set a Unit-Type Variable, the unit doesn't have too be pre-placed that way, dunno if that helps, as I didn't read the whole post. |
| 05-10-2006, 08:02 AM | #3 |
You can do this, but its in JASS, and im at school at the mo, so i couldent write this for you sorry. When i get home, il do it, its simply Shadow1500's method but with a different event. |
| 05-10-2006, 08:12 AM | #4 |
That would be cool, thanks. I'm thinking for the map I want to create I'm going to have to start understanding JASS better than I do. It looks confusing and looks like it will take some time to catch on, but I'm a fast learner. Knowing how to know when two units collide will be very useful. |
| 05-10-2006, 07:25 PM | #5 |
Iv been looking everywhere, but i cant find it. Sorry. The basics of Shadow1500's is, you dont have to use units already put on the map, you can use varaibles, its just that GUI dosent let you. If you convert to custom text, and are ok'ish with JASS, it wouldent be to bad, but the system you want, requires attaching varaibles, handle varaibles, gamecaches and things like that, 100% JASS. The basics is, you can use any unit, its just that its slightly complicated. Im not your man for this job sorry, im not fully into events, its the actions i focus on. Sorry. |
