| 02-21-2003, 06:07 AM | #1 |
Well beta testing is rolling along on my map...but I really need to add "safe zones" in town or the map degenerates into chaos. I'm not really sure how to achieve this though... [Event] Unit is issued order targetting a unit "Attack" [Condition] attacking unit is in <gen> SafeZone1 attacking unit is owned by ((player matching condition)player is curerntly playing)) [Action] Order attacking unit to Stop Will that work? |
| 02-21-2003, 06:11 AM | #2 |
Why not just do, Unit - Make unit invulnerable, Then everyone to be his ally, that way he wont attack anyone, but if it does attack, then tell it to stop. |
| 02-21-2003, 06:22 AM | #3 |
Guest | This won't stop other orders besides attack. I don't think it would stop "patrol" and I don't think it would stop area effect spells either. The best way to to do safe zones is to have the safe zone too far away to be attacked. Then just have a "teleport" region that moves the unit away. I have a similar problem in my map, so I just decided to opt out of safe zones altogether. It's hero arena, so safe zones are important, but I think this solution will work out fine. |
| 02-21-2003, 08:45 PM | #4 |
Yeah just make all units in that area invulnerable that way no one can attack em. Then way they leave make em vulnerable. |
| 02-21-2003, 09:07 PM | #5 |
Guest | That won't stop the "safe" unit from attacking a unit outside the safezone. That's pretty cheap in my opinion. |
| 02-21-2003, 10:46 PM | #6 |
i think the idea is to have a common safe area, not team specific ones, so you should use the invulnerable method. However this can be improved by creating 2 regions, and outter safe zone and an inner safe zone. (the outer encompases the inner as well) when a unit enters outer safe area they get X sec of invul. to enter the inner safe zone. Once inside the inner safe zone they get perm invul until they leave. X should be something like (unit (entering unit) current movement speed)/(dist between inner and outer safezones) + 1.00 seconds edit: invulnerability is the ONLY practical method, as you would have to detect and stop all spells as well. |
