| 10-17-2002, 04:01 AM | #1 |
I've been trying to work with the Convert Point With Size to Region, but its giving me no love. Try as I may, it just doesn't work right. Sometimes it works, sometimes it doesn't. Has anybody got this to work? If I can get this to work, it will allow me to make "pseudo-regions" that are temporary. :D . |
| 10-17-2002, 04:11 AM | #2 |
You're going to have to give a bigger context for this. What are the specific actions you're trying to use the function under? Region variables in general are fickle, and there's no way to tell from your post if that's the problem or if it's just you misusing/understanding some triggers :P |
| 10-17-2002, 04:22 AM | #3 |
Anyways, everytime I try to use this trigger (because I want to create a temporary region) on a unit's position (the only way I found to be viable), the temporary region doesn't work properly. I have gotten strange effects like having some units in the "region" affected and others are not. I thought at first that the size of the region was the problem, but its not. No matter how large the region is, most things don't get affected. If only there is a way to check where and how big the region is, I can diagnose the problem. This is very strange....:bgrun: |
| 10-17-2002, 04:33 AM | #4 |
Event: A unit owned by player 1 is issued an order with no target Conditions: Issued order is equal to stop Unit type of ordered unit is equal to (someUnit) Region centered at position of ordered unit with size (200, 200) contains random unit from units owned by player 2 equl to true. Action: If (((Region centered at (position of (ordered unit))) with size (200, 200)) contains (random unit from (units owned by player 2))) = true, then do unit explode triggering unit, else do nothing. Special effect: create special effect at position of ordered unit using blahblah..thunderclaptarget.mdl (the special effect is to see if the trigger runs) (NOW, the strange thing occurs, it doesn't work, no effect, BUT, after pressing stop many many times, the special effect does happen. Wierd no?) |
| 10-17-2002, 05:05 AM | #5 |
Hm...not really weird. The problem is that you're using 'Random unit from units owned by player 2'. Now, I'm assuming there are player 2 units all over the map. Lets say there are 10 player 2 units. 5 units are in this 'region' that you are defining. You have a 50% chance of picking one of the units owned by player 2 that is also in the region. So half of the time it doesn't work. To further worsen the problem, you have this in your condition for the trigger and again in an if statement. So basically, you have 1/4 of the chance of this trigger running to completion with the assumptions stated above. In reality, this probablity is way lower. Finally, I can't really think of an easy way around this. Maybe someone else on the board can come up with a clever simple solution. |
| 10-17-2002, 07:47 PM | #6 |
Guest | Don't use the Region condition, and make the action thus: Unit Group: Pick every unit in (Units in (Region centered at (Position of (Triggering Unit)) with size (200.0, 200.0))) and do Action You don't need the Region condition because if you do it this way, the Unit Group will be empty when there aren't any units surrounding the Triggering Unit. If you need to do more than one action (which I think you do), make the above action "Add picked unit to unit group" and then pick all units in the unit group for more actions. The special effect should only be run If (Integer Comparison) # of Unit in the region around Triggering Unit > 0, else the effect will run every time you hit Stop. |
| 10-17-2002, 09:25 PM | #7 |
Now that you guys have said that, I feel so dumb.:sweatdrop . Oh well, now I know what's happening. Thanks guys!:foot: Btw, be on the lookout for the new version of Warcraft Team Fortress!!! (With grenades, if you see where I'm going with my triggers) |
