• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I am working on a system

Status
Not open for further replies.
Level 7
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

  • 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
                • 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 (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
              • Custom script: call RemoveLocation(udg_Loc_to_remove)
              • Custom script: call RemoveLocation(udg_TempPoint)


anyone know what causes this error?
Error.jpg
 
Last edited:

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
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

That's is impossible unfortunately, you have to make a workaround solution for this.
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
I don't think it's impossible, nothing is impossible with Warcraft III's World Editor.
You could try creating it using multiple triggers too:)
 
Level 7
Joined
Apr 1, 2010
Messages
289
Sorry i didn't make myself clear, What i was wondering is if the amount of armor can be detected, not the type, and yeah i agree with you sinizi it would be possible to have the armor type of the unit by putting each unit in a different unit group: ) but what i'm trying to do is detect the units current amount armor, so that bonus damage can be added, if anyone who knows Jass can help i would be very grateful, because i don't a thing about jass, and i think that the amount of armor can probably be detected in Jass

GunSlinger21 said:
I think he wants us to test the map and give him/her feedbacks.
Feed back would be very useful gunslinger
 
Last edited:

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
What i was wondering is if the amount of armor can be detected, not the type, and yeah i agree with you sinizi it would be possible to have the armor type of the unit by putting each unit in a different unit group: ) but what i'm trying to do is detect the units current amount armor, so that bonus damage can be added, if anyone who knows Jass can help i would be very grateful, because i don't a thing abou jass, and you can probably detect the current amount of armor using it some how

Feed back would be very useful gunslinger
Not that either.
 
Armor can be detected but you need few triggers for that and variables also!
Set armor of all heroes to 0!
Set hero armor below bonus or whatever in gameplay constants to 0!
Create formula with variables that will check hero agility/3 (default one).
There you go :D

Btw you will need to store item and ability armor bonuses as variables and add them to formula as well!
 
1. Uhm, why you don't add modify armor types and damage types? However if you really need to know why types have specified armor, use triggers to detect which unit and with if statements do desired actions, depends where this unit falls. This can grow a lot, so in other case you can use custom values or unit handles with hashtables to store the info of each unit.

2. I think that there are triggers comparison which can compare height of current point.

3. What you want the group to do when low on morale?
 
Level 7
Joined
Apr 1, 2010
Messages
289
well, what The "morale" Does is it causes the unit to route, in simpler terms run away from the enemies like scared rabbits, what i think would work is to set a unit group, of a point check for enemies sand then order the unit to move there if there are no enemies, -Kobas- your idea is a good one thank you:) but the problem is, what if they are under the effects of devotion aura? there are just way to many things to deal with,
so i have decided to forgo the "armor" detection since i have found out that it is impossible and instead just add a dummy ability called "armored" and another on called "heavily armored"


You can use custom script
what custom script would you use? because i don't know any Jass. I know some script the ones that are used to deal with leaks but i don't know any other ones.

Edit:1 oh, never mind I found out which Function to use GetLocationZ so I'll add in hill defense bonus, at Tomorrow. around 11:00 THW time
 
Last edited:
Status
Not open for further replies.
Top