| 09-21-2004, 03:01 PM | #1 |
im trying to make a "tripwire" thing that activates when a unit walks between 2 units. I'm not using regions since it needs to be able to work at any angle, instead i'm going to try this: when the 2 untis are summoned, a distance variable is set to the distance between them. When a unit comes within range of both units, so that the 2 ranges add up to the total-distance variable, the trigger fires. think this will work? *p.s. i also gonna use spiffy new lightning triggers on this so it looks cool * |
| 09-21-2004, 10:41 PM | #2 |
hmmm i don't think that's possible without regions |
| 09-21-2004, 11:02 PM | #3 |
the primary flaw with that is the 'unit comes in range' is only fired once and thats when the unit touches the boundary of the range field, so in order for the 'trip' to happen the unit would have to enter a range perfectly inline with the 'bombs'... you could have like periodical checks on units that have entered and are in range or something, i dunno, my brains dead right now |
| 09-21-2004, 11:42 PM | #4 |
try this pseudo-trigger: Code:
Event -Unit comes within (Distance between 2 units / 1.90) of unit1 -Unit comes within (distance between 2 units / 1.90) of unit2 Conditions -Triggering unit is within (distance between 2 units / 1.90) from unit 1 -Triggering unit is within (distance between 2 untis / 1.90) from unit 2 Acitons -Game (Display Text auto time) "|cffff0000Tripwire!!! UBER NOOBER|r" I think that should work. /1.90 instead of 2 to give it some leeway. |
| 09-22-2004, 12:03 AM | #5 |
with the /1.90 part, you mean it splits distance in half? No, i dont mean that it fires when the unit walks DIRECTLY between them, i mean like if they are anywhere between them. I'll try to adapt yours thouhg. |
| 09-22-2004, 12:49 AM | #6 |
If you want that you'll have to figure out how to do something with polar offset, but I'm not sure what. It's probably easier, if slower, to just put about a dozen or so small regions between the two units and have the effect trigger when a unit enters one of those. Inefficient, but it fulfills all the functions. |
| 09-22-2004, 02:44 AM | #7 |
You could always have it so when the trigger fires, creat invisbile units with Locust ability between the 2 units that set the wire. Then set all of the invisible units to a variable array and then just have something like "if unit comes within range of position of unit" I dont have my map editor open and I havnt messes around with it in a while but i think that should work. |
| 09-22-2004, 03:08 AM | #8 |
i got another idea, i could have the units cast shockwaves on eachother repeatedly. By modifying it so all art is removed and the misslespeed is really fast it could work. |
| 09-22-2004, 04:18 PM | #9 |
If they cast shockwave on each other repeatedly, then it would only work if they stayed a set distance apart. If they were very close to one another, walking around the outside of one of the units would still cause them to get hit by the shockwave. The shockwave thing might work if the two units that are summoned are immobile and always the same distance apart. Is that the situation? When you said summoned units, I figured they'd be walking around. I don't know if this would work, but I had a kind of funny idea. If they were mobile, you could consider making it so that both units had to be stationary to use their tripwire. After they were both stopped, you could create an invisible unit with a very fast walk speed that patrolled their location. You could give it a very small range, and use the "Whenever a unit comes in range" event to use when to fire it. Anyway, that may not be what you want at all, just thought I'd offer that up if you wanted it. The patrolling unit might work better than shockwave anyway, unless they are very far apart. |
| 09-22-2004, 06:44 PM | #10 |
the units Are stationary, theyre gonna be wards. So does that mean it'll work since it be set distance? |
| 09-22-2004, 08:30 PM | #11 |
Yeah, seems like Shockwave can work for you as long as you edit the distance on the spell to be whatever the distance is between the two units. I don't really think there is going to be a way to make it work perfectly - units might take double damage sometimes because they are hit by two shockwaves, or you may be able to sneak through without getting hit at all. But for the most part, I think you'll be able to make it work. If you have a lot of problems with Shockwave, you might seriously want to consider that idea I had (an invisible unit that patrols the distance between them). I'm obviously not an unbiased source since it was my idea, but I would probably do it that way if I were going to make this spell. Depending on the distance, I might make two invisible units to patrol to make sure you couldn't sneak through. Either way, good luck :) EDIT: Shockwave may have terrain deformation hardcoded into the spell, I think I remember someone talking about that being a problem. You may need to base it off a different spell. |
| 09-22-2004, 08:31 PM | #12 |
just make one of the units cast shockwave the distance, or make both cast shockwave half the distance. |
| 09-22-2004, 10:05 PM | #13 | |
Quote:
|
| 09-22-2004, 11:47 PM | #14 |
I would spawn a string of dummy units in the space between the two points. The dummy units should be invisible and have a ground-targeting attack. When one attacks, you should probably remove each of the dummy units and do whatever it is you want to do with the tripwire. The trigger for placing the dummy units is something like this: Code:
Event:
A unit spawns a summoned unit
Condition:
Summoned unit = sentry ward
Action:
If-then-else:
If: Sentryward 1 placed = true
Do: Set Sentry Ward 2 = summoned unit
Else: Set Sentry Ward 1 = summoned unit
Set Sentryward 1 placed = true
Skip remaining actions
Set Temploc = position of Sentry Ward 1
For each integer between 1 and ((Distance between Sentry ward 1 and Sentry ward 2)/50)
do:
Create 1 dummy unit for owner of summoning unit at temploc
Set temploc = polar offset- temploc offset by 50 in the direction of Sentry Ward 2You'll probably have to clean that up a little for memleaks. |
| 09-23-2004, 12:55 AM | #15 |
dang, i forgot about the terrain deformation. I have yet another crazy idea; STAMPEDE! If i can set ti to narrow 1-beast area w/ no beast art, and very fast repeating, it could work.... thnx again for all the help yall, if this works it'll be kickass |
