| 11-14-2007, 04:22 AM | #1 |
This doesn't necessarily deal with triggers as much as it does with common movement, but I'm having this WIERD problem with controlling locust/invulnerable units. I am using them as moving, substitute dummy units, because I didn't think I'd have a problem. However, my friend and I tested this several times and it is not a coincidence. Okay, so the caster casts this spell that creates a moving invulnerable/locust unit. Next, I order the last created unit (or the projectile unit) to move in the direction that the caster is facing, a little like shockwave. I'm not using the actual shockwave, because I need to find out where the projectile is to trigger damage, and I found out the hard way that you can't do that with Shockwave. (Hey, at least I tried) Now, I tested this spell on clear, flat terrain. Works perfectly. I try it in forested terrain... Not so perfect. Sometimes, my unit projectile would start out going straight, then just out-right start swerving to the left or right after a second or two. I thought that this was just plain wierd, so I added some boundries to test it out some more. Sometimes, the projectile unit wouldn't pass the boundries and would stay stuck- that's good. Sometimes, it just went through them- that's bad. I felt even more dumbfounded and decided to go back to the forest. I decided to push it off a little and created another dummy unit (in trigger format, it is created first and then I use a Unit Group action to detect what kind of unit to remove from the game afterwards to get rid of it) that is created before the projectile dummy. Now, the movement of the projectile dummy is still the same; it will move a certain distance in the direction that the caster is facing. Then... something even wierder happens. The projectile- when it's suppose to go in the direction of the facing of the caster, goes in a completely different direction; it doesn't swerve at all. It just goes a complete 90 degrees or spins in the exactly opposite direction of where it's supposed to hit. I know the damage plays no relevance to the movement of the projectile, so I don't bother with it. Now I know that something is wrong. I was looking at the unit and it has no collision and no pathing. I thought this created no problems. I missed something, but what? Is my trigger wrong or is the unit's fields wrong? I ask, because I've tried to fix it many times, but it hasn't work so far. Some help here, you guys? I'd really appreciate it. |
| 11-14-2007, 05:16 AM | #2 |
Post the trigger...? |
| 11-14-2007, 07:30 AM | #3 |
Tl;dr most of it, but make sure your dummy is air type movement. |
| 11-14-2007, 07:04 PM | #4 |
0 collision size != no collision. Also, units that are moving by orders cannot move other than in 45 degree directions. So use SetUnitX/Y to move it. |
| 11-15-2007, 12:23 AM | #5 |
Bah, I figured as much. I've done some stuff with dummy units before and this has happened. Oh well, at least I know it is confirmed. Okay, I'll do that, Captain Griffen. Dil999, I'll look at that. I also noticed that dummy units for other spells seem to go past trees and stuff with no problem. Was that only because they were flying, or what? |
| 11-15-2007, 01:42 AM | #6 |
They use "SetUnitX/Y" (which ignores pathing) in a loop. |
| 11-15-2007, 06:28 AM | #7 |
Dummy units SHOULD ignore pathing anyway, to avoid intersecting with other stuff. Your problem likely lies with WC3's non-direct pathing system (8 possible directions to travel). |
