| 11-07-2002, 03:07 AM | #1 |
I've made a map that I cannot use the standard melee scripts, so I'm coding alittle bit of AI for my heros. 1. With triggers and scripting, how can I make computer heros use their abilities, for example, how can I get the paladin to heal himself or others ? 2. How can I detect if a peon is in the middle of building something ? 3. How can I make computer heros pick up items ? (I know how to make them use items) 4. I cannot seem to attach a region to a hero, I made a trigger with a perodic event that runs every .1 seconds, and centers on the hero. I then created a when a unit enters a region trigger for the trigger attached to the hero, and I then move around and find that the region is not on the hero, but the region has not moved from where I placed it on my map, becuase I have another player walk over that area, and it says that you are entering the area like my trigger said it would, but not working the way I want it, any ideas on this one ? |
| 11-08-2002, 08:18 AM | #2 |
You CAN move regions to places, however you CANNOT tell if somebody enters them anymore. I use a trigger which makes NPC(s) walk with your hero by having a region periodically (Lol, I can't spell) move to position of my hero. To have the comp use an ability, set up Events, Conditions, etc. then use action. Unit- Issue order (targeting a unit/region or with no target) Hope that helps. |
| 11-08-2002, 06:43 PM | #3 |
Ok, I believe that you can attach regions to heros, but if I create a trigger that moves a region to the center of a hero. Then I go to the extreme other end of the map where I originally placed the region supposedly attached to the hero, and then I walk over it, it says the creep or hero that I was controller enters that region ? Is it really attached then, even though that message would seem to be evidence to the contrary? |
| 11-09-2002, 03:08 AM | #4 |
Yes it really is attached. Try this: Event - Whatever Action - Unit - Order Unit (X) to move to (Moved region) The unit will go to the new location. For some reason though the unit enters region command only works with the starting location of the region (figured this out in my PacMan map). Why? I don't know. Maybe it has something to do with the Map Initialization stuff. |
