| 04-03-2004, 03:41 PM | #1 |
I want to make it so that my RPG has creeps that walk around so they arent just in place. Creeps also respawn in my map every, lets say, 75 seconds if one dies. I make it so that every 10 seconds the unit will move to a random point within region, and that works. How do you make it so that when the creature respawns, the walking trigger will work for the respawned creature. An example I have is my special dragon creep, Drakos. He walks every 10 seconds to a random point within his region. When he dies, in about 3 minutes I want him to respawn and walk around randomly in his region every 10 seconds like the last one. I cant get this to work, the respawned dragon only walks once, and then stays in place. Can you give me the triggers I need to make this work? Sorry if this is confusing, if you don't get it, I can try to clarify this...Thanks ^_^ |
| 04-03-2004, 04:24 PM | #2 |
Instead of "Issue Unit X an order to move to random point in region Y" could you "Issue all units of Type X in region Y an order to move etc.?" I think that would take care of the problem; since the units will never leave their home regions, they should always get the orders. |
| 04-03-2004, 05:08 PM | #3 |
Now theres two things, and I'm not sure if the first will work quite right. every 10 seconds pick all units in region owned by player neutral hostile [assuming u dont use neutral hostile for anything but creeps] order picked unit to move to position of picked unit offset by random #, from # to #, towards random angle If that sends all the units to the same position, then do this every 10 seconds pick all units in region owned by player neutral hostile [assuming u dont use neutral hostile for anything but creeps] and add to unit-group variable Creeps for integer A (1 to # of units in Creeps) CreepUnit = random unit from creeps order CreepUnit to move to position of picked unit offset by random #, from # to #, towards random angle remove CreepUnit from Creeps |
| 04-03-2004, 05:22 PM | #4 |
Ooh you know what would be a neat way of solving this problem? Just give every neutral hostile unit Wander - Hostile! That won't restrict their movements, but you can rig something up using your regions - something like E-A unit leaves Region X C-Unit belongs to neutral hostile A-order triggering unit to move to random point in Region X as long as the regions don't overlap, that should work great. |
| 04-03-2004, 09:11 PM | #5 |
If you mean Wander(Neutral), I tried that ability, but sometimes the unit will be stupid and walk away while a unit attacks it. This is why I wanna use triggers. Thanks guys, I'll try out this stuff ^_^ |
| 04-03-2004, 09:13 PM | #6 | |
Quote:
Just use a trigger to disable wander once an enemy unit gets so close. Though you may encounter problems with invisible units. |
| 04-03-2004, 11:42 PM | #7 |
I believe there is another form of Wander - ie NOT Wander(Neutral) which won't do that... but maybe I'm just insane. |
| 04-04-2004, 12:49 AM | #8 |
It's Tornado Wander you're looking for. (You'll need a new buff, for that also seems to give it a timed life unless you customize) |
