| 06-06-2003, 07:05 AM | #1 |
How would I make it so when any unit comes within 100 of any Peasant, the peasant would come under control of the player whose unit came within 100. Using triggers that is. |
| 06-06-2003, 11:49 AM | #2 |
Guest | JASS would be needed, I think. The idea would be to have a trigger fire every time a peasant enters the playable map area, and have that start up a trigger with the event "Unit comes within x of (Triggering Unit)" |
| 06-06-2003, 12:08 PM | #3 |
Unit X comes in range of X Change owner ship of X to unit in range, or X Regards Dead-Inside |
| 06-06-2003, 12:12 PM | #4 |
only problem there is the unit in range only works with preplaced units, you cannot use custom variables there. |
| 06-06-2003, 01:10 PM | #5 |
I've already solved this in another thread.. Use a unit array. But you probably need JASS to change the index eatch time you create a new unit. So basicly you read if it's in the array or not, if it is, then it can enter. If I'm incorrect, please someone correct my error, because I have a feeling it's the wrong variable. |
| 06-06-2003, 06:49 PM | #6 |
You can make a trigger respond to units that aren't preplaced, however it does require you to program it in JASS. Basicly, whenever a new peasant enters the board, you would create a new trigger on the fly, and register an event for when another unit comes within range of it. As part of your function to handle Actions you would then destroy the trigger after control of the peasant has been given to the player. No global variables required. |
| 06-07-2003, 05:30 AM | #7 |
Or a much simpler action Make the peasants be owned by a rescuable player. Set rescue range to 100. Voila. |
| 06-07-2003, 05:23 PM | #8 |
Guest | What and were can I get JASS =? it seems to be a pretty needed tool for map makers ! so plz respond on this msg... |
| 06-07-2003, 05:39 PM | #9 |
JASS is the scripting language of Warcraft III. You can problably find some tutorial on it somewhere. |
| 06-13-2003, 01:05 PM | #10 |
Guest | Post the map and i'll change it to work for you |
