- Joined
- Mar 30, 2013
- Messages
- 664
Iv'e created a map for about 1 year ago an epic map size. And the category is Defence/survival, where the player got a main hero and his tasks is to protect allied cities from the attackers. His seconds mission is to create a base for him self when he got the resources to do it. If you want to see the terrain on how the map is (picutres): http://www.hiveworkshop.com/forums/members/227524-albums6510.html
Ok. My problem is that the enemies who are going to attack randomly cities that the player are allied to. Is going spawn and attack. I got 3 Spawn points where the enemies attack. But the triggering is to hard and i tried to figure out how to do it for about 4 months now. When i tried the spawning, like first time, they was OK. They did move but didnt attack. Altought i tought i needed Variables to store the spawned units (im not good at variables so it can be that...
Heres my tiggers for the enemies spawn/move.
I got as variables:
-allUnitsinmap variable type: unit group initial type Zero
-teamGroup variable type: unit group initial type Zero
-tempPoint variable type: Point initial type NONE
-UnitSpawnGroup variable type: unit group initial type Zero
Can some one help me with this, so i can be done with my map?
Ok. My problem is that the enemies who are going to attack randomly cities that the player are allied to. Is going spawn and attack. I got 3 Spawn points where the enemies attack. But the triggering is to hard and i tried to figure out how to do it for about 4 months now. When i tried the spawning, like first time, they was OK. They did move but didnt attack. Altought i tought i needed Variables to store the spawned units (im not good at variables so it can be that...
Heres my tiggers for the enemies spawn/move.
-
Spawning
-
Events
- Time - Every 5.00 seconds of game time
- Conditions
-
Actions
- Set tempPoint = (Center of EVIL SPAWN 1 <gen>)
- Unit - Create 1 Legionare for Player 1 (Red) at tempPoint facing 0.00 degrees
- Unit Group - Add (Last created unit) to UnitSpawnGroup
- Unit - Create 1 Commandre for Player 1 (Red) at tempPoint facing 0.00 degrees
- Unit Group - Add (Last created unit) to UnitSpawnGroup
- Custom script: call RemoveLocation( udg_tempPoint)
- Custom script: set udg_tempPoint = null
- Set tempPoint = (Center of EVIL SPAWN 2 <gen>)
- Unit - Create 1 Dimension Magican for Player 1 (Red) at tempPoint facing 0.00 degrees
- Unit Group - Add (Last created unit) to UnitSpawnGroup
- Unit - Create 1 Demon Hound for Player 1 (Red) at tempPoint facing 0.00 degrees
- Unit Group - Add (Last created unit) to UnitSpawnGroup
- Custom script: call RemoveLocation( udg_tempPoint)
- Custom script: set udg_tempPoint = null
- Set tempPoint = (Center of EVIL SPAWN 3 <gen>)
- Unit - Create 1 Demon Beast Rider for Player 1 (Red) at tempPoint facing 0.00 degrees
- Unit Group - Add (Last created unit) to UnitSpawnGroup
- Unit - Create 1 Infernal Knight for Player 1 (Red) at tempPoint facing 0.00 degrees
- Unit Group - Add (Last created unit) to UnitSpawnGroup
- Custom script: call RemoveLocation( udg_tempPoint)
-
Events
-
Attacking
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in UnitSpawnGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Current order of (Picked unit)) Equal to (Order(stop))
-
Then - Actions
- Unit - Order (Picked unit) to Attack (Random unit from allUnitsInMap)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in UnitSpawnGroup and do (Actions)
-
Events
I got as variables:
-allUnitsinmap variable type: unit group initial type Zero
-teamGroup variable type: unit group initial type Zero
-tempPoint variable type: Point initial type NONE
-UnitSpawnGroup variable type: unit group initial type Zero
Can some one help me with this, so i can be done with my map?