- Joined
- Apr 1, 2010
- Messages
- 289
The system is for advanced combat, it adds flanking, Battle experience, etc.
what I am trying to do is:
1 Make it so that Units that are anti armor do bonus damage base on the units armor i need to detect the Units armor to do this and it can't be done in Gui in the regular World Editor
2 Make it so that There is height advantage for ground units, so that it is important to claim the "high ground" again this can't be done, (as far as i know) in the World Editor
3Add morale in, I have an Idea about how to do that And have completed it but, I want them to not only run randomly run away from enemies, and i am not exactly sure the best way to do that
anyone know what causes this error?
what I am trying to do is:
1 Make it so that Units that are anti armor do bonus damage base on the units armor i need to detect the Units armor to do this and it can't be done in Gui in the regular World Editor
2 Make it so that There is height advantage for ground units, so that it is important to claim the "high ground" again this can't be done, (as far as i know) in the World Editor
3Add morale in, I have an Idea about how to do that And have completed it but, I want them to not only run randomly run away from enemies, and i am not exactly sure the best way to do that
-
Fleeing
-
Events
- Time - Every 0.06 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in MoraleFleeing) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
-
Else - Actions
-
Unit Group - Pick every unit in MoraleFleeing and do (Actions)
-
Loop - Actions
- Set Loc_to_remove = (Position of (Picked unit))
- Set TempPoint = (Loc_to_remove offset by (Random real number between 300.00 and 500.00) towards (Random angle) degrees)
- Unit - Order (Picked unit) to Move To TempPoint
- Set AntiLeakGroup = (Units within 512.00 of Loc_to_remove matching (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))
- Set MoraleEnemys = (Number of units in AntiLeakGroup)
- Custom script: call DestroyGroup(udg_AntiLeakGroup)
- Set AntiLeakGroup = (Units within 512.00 of Loc_to_remove matching (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True))
- Set MoraleAllies = (Number of units in AntiLeakGroup)
- Custom script: call DestroyGroup(udg_AntiLeakGroup)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- MoraleAllies Greater than MoraleEnemys
- MoraleEnemys Equal to 0
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set MoraleRallychance = (Random integer number between 1 and 5)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MoraleEnemys Greater than or equal to MoraleAllies
-
Then - Actions
- Set MoraleRallychance = (Random integer number between 1 and 15)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MoraleRallychance Equal to 1
-
Then - Actions
- Unit - Set level of Morale for (Picked unit) to 5
- Unit Group - Remove (Picked unit) from MoraleFleeing
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Loc_to_remove)
- Custom script: call RemoveLocation(udg_TempPoint)
-
Loop - Actions
-
Unit Group - Pick every unit in MoraleFleeing and do (Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
anyone know what causes this error?
Last edited: