| 08-13-2005, 04:04 AM | #1 |
i'm trying to make a trap off of a region.. thing is i want it to be 'buildable' by a unit... so, i set up regions and at initialization i add them to an array to distinguish them apart. ok, so when i build a unit of type x.. i have a trigger that centers the appropriate region to the center point (x,y) of the built unit (type x). then i have a trigger set up for 'enters region'. thing is, when i move the region like that.. something goes wrong where the trigger doesn't fire any longer. any help would be appretiated. maybe an alternative method of creation could be suggested also. |
| 08-13-2005, 06:09 AM | #2 |
Well, dont use rects for one thing. |
| 08-13-2005, 06:23 AM | #3 |
you mean, don't use regions or rects? how would it be done then.. what i'm trying to do is be able to use a builder to 'designate' some 'point' that's the center of a larger 'area', in which i can apply trigger actions to units that enter that 'area'. |
| 08-13-2005, 03:03 PM | #4 |
use Unit- Unit comes within range (200) of (x unit) |
| 08-13-2005, 11:54 PM | #5 | |
Quote:
there's no 'unit - unit leaves range'... i need an enter and leave to apply and strip affects.. |
| 08-14-2005, 12:49 AM | #6 |
You could have the trap setter build a unit that has an aura if the trap effect can be packaged into an aura, if not can have the aura give a buff that does nothing, (devotion with +0 armour) and have a trigger check all units every 5 sec check if unit has buff of the aura's effect if so do trap effect, if not remove effect. Just be carfull with triggers that run every few sec. If you don't catch all the memory leaks your game will lag bad. |
| 08-14-2005, 03:26 AM | #7 | |
Quote:
next problem would be that in order for the player that controls the builder to place the 'building' that does this aura is that it requires a pathing area. you can set collision to 0.00 and then turn it off with triggers also, but units will still refuse to walk 'over' the building. i suppose i could adjust them to be hover or fly, but i would like to see another way. |
| 08-14-2005, 04:20 AM | #8 | ||
Quote:
then make a periodic event that checks to see if the unit is in range... |
