- Joined
- Jun 2, 2009
- Messages
- 1,233
Hello everyone. My name is Volkan. I am the guy who creates maps for his friends. Age 36 and still i am active player. I am rarely requesting help when it comes to the World Editor.
Here is the scenario. You have an AI player which have 1 Hero. AI player and several units attacking enemy tower. When 5 of the units have died (1 ai hero and 2 units left) ai hero have to fall back. Somehow i cannot pass to action. Here is my last attempt. I have tried to simplify the code for the testing purpose.
Kac Kule ai Copy
How can i make it work. Since yesterday i was spending 8 full hours and honestly i don't have any idea why i cannot make it. I will be happy if someone can help me about that. I want to make them retreat when attacking tower detects 2 or less units within it's range.
Here is the scenario. You have an AI player which have 1 Hero. AI player and several units attacking enemy tower. When 5 of the units have died (1 ai hero and 2 units left) ai hero have to fall back. Somehow i cannot pass to action. Here is my last attempt. I have tried to simplify the code for the testing purpose.
Kac Kule ai Copy
Code:
Kac Kule ai Copy
Events
Unit - A unit Is attacked
Conditions
And - All (Conditions) are true
Conditions
(Attacking unit) Equal to Guard Tower 0013 <gen>
((Attacked unit) is A Hero) Equal to False
(Number of units in (Units within 800.00 of (Position of Guard Tower 0013 <gen>) matching ((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Number of units in (Units within 800.00 of (Position of (Attacking Unit)))) Less than or Equal to 2
Actions
Unit - Order ai1hero to Move To (Center of Region 001 <gen>)
Unit - Order ai2hero to Move To (Center of Region 001 <gen>)
Unit - Order ai3hero to Move To (Center of Region 001 <gen>)
Unit - Order ai4hero to Move To (Center of Region 001 <gen>)
Unit - Order ai5hero to Move To (Center of Region 001 <gen>)
Game - Display to (All players) for 2.00 seconds the text: (Name of (Attacking unit))
Game - Display to (All players) for 2.00 seconds the text: (Name of (Attacked unit))
Game - Display to (All players) for 2.00 seconds the text: (Name of (Picked unit))
How can i make it work. Since yesterday i was spending 8 full hours and honestly i don't have any idea why i cannot make it. I will be happy if someone can help me about that. I want to make them retreat when attacking tower detects 2 or less units within it's range.