HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AI Using Triggers (Can't get this to work)

12-28-2002, 10:52 PM#1
MrDoomMaster
I have created a test map that im using to see how i can make an AI through Triggers. I have completed what i think will work, but as it turns out; it doesn't work at all. Here's what it's supposed to do:

When you start the map, you have 3 heros to choose from. When you pick one by walking over its circle of power, the one you chose changes ownership from Neutral Passive to Player 1, and the other 2 heros you did NOT choose change from Neutral Passive to Player 12, and are given the order to follow you. When your walking around the map with your mercenaries following you and you come across a Neutral Hostile unit, and if the Neutral Hostile unit comes within a 600.00 range of either mercenary, then the corresponding mercenary is supposed to be ordered to Attack-Move To the position of the triggering unit (in this case, the triggering unit would be the Neutral Hostile unit.) Once there are no more enemies in their 600.00 range, they are again ordered to follow you and the process repeats.

Here's what really happens:

Everything works well at the start, pick a hero and the other 2 are ordered to follow you. The problem is when i come near a Neutral Hostile unit, the other 2 heros continue to follow me and arent' even given the order to attack-move to.


I would appreciate it if someone could take my map, play it, look at it, and maybe see if they can find out what im doing wrong. I have made many maps in the past, but i am not very experienced on making AI through triggers. If you find what is wrong, i would really appreciate it if you could explain the problem to me. Thanks a lot. I await a response.
12-29-2002, 11:48 PM#2
SuperIKI
I can't open your map.
Maybe you used a third party map editor or some trigger patch.

I can just guess what might be wrong:
Be sure that you don't use the event "unit enters region", because that event is bound to a STATIC region.
Once registered, the region cannot move afaik.
You had to reregister the event. Don't do it that way.
I would use a periodic trigger that checks the region around your hero and if it contains any monsters, you can do your attack move with your 2 guys. This should work.

You don't need any advanced triggers to achieve this. Just stick with the normal WorldEdit or at least say which version you use if you want people to be able to look at your map. :)