• 🏆 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!

The_Flood's Combat System 1.0b

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Well, this is a combat system I created to learn a little about Hashtables. It's fully GUI and MUI and leakless, only a few JASS strings to remove the leaks. This system simply detects when a unit enter a combat or leave a combat and you can simply check if a unit is in combat or not and do special events about it, like, heal all units that isn't in combat and more. If you have any feedback or just want to post a comment, please do it! And rate of course. // The_Flood (Flood @ hiveworkshop).



The_Flood's Combat System [Version 1.0a]

This is the first thing I've ever created by using the new Hashtables that came with patch 1.24 for Warcraft III.
I think it wen't out kinda good, even if it were my first time using those Hashtables.
Well, this system detects if a unit enters combat or leaves combat and with this system you can easily check later
if a unit is in combat or not and do something about it, check the "ATriggerThatUsesThisSystem" trigger.

Edit this system by changing three simple variables in the "CombatSystem Initialization" trigger:

// This is how much time it will take before a unit leaves the combat, IF the unit haven't attacked or got attacked.
Set TheTimeBeforeLeavingCombat = 10.00
// This is the text that will appear when a unit enters combat.
Set EnteringCombatText = |cffff0000Entering Combat!|r
// This is the text that will appear when a unit leaves combat.
Set LeavingCombatText = |cff00ff00Leaving Combat!|r

Simple, isn't it?

The import is also easy, just copy those triggers:

> CombatSystem Initialization
> CombatEnter
> CombatLeave
> CombatChecking

... and if you want an example, also copy the "ATriggerThatUsesThisSystem" trigger.

Have fun triggering and using this system! :)



Version 1.0a
- #Release

Version 1.0b
- #Added an option that allow you to change if the floating combat texts will appear or not.
- #Fixed an issue that units didn't left the combat when they ran away.
- #Reduced the lagg by changing the unit group pick. Now ONLY the units in combat will be picked, not everyone.


Keywords:
GUI, Combat, System, Combat System, MUI, Leakless, Simple, Advanced, Check, Trigger, Flood, The_Flood,
Contents

The_Flood's Combat System (Map)

Reviews
12:03, 14th Jun 2010 Hanky: I found some things that have to be fixed: - there's a bug, in the combatenter trigger you increase the combat_index variable with 2 but in the combatchecking trigger you just decrease it with 1, so the trigger even if...

Moderator

M

Moderator

12:03, 14th Jun 2010
Hanky:
I found some things that have to be fixed:
- there's a bug, in the combatenter trigger you increase the combat_index variable with 2 but in the combatchecking trigger you just decrease it with 1, so the trigger even if there are no combats
- maybe change the way of attaching the datas to your units, but well it's okay how it is

After you fixed improved those things message me or an other spell moderator.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
I can open it but I also had problems with lots of other spells I could not open :/
-however picking al units in playable map area twice every second might be lethal for performance
you may add all units in combat to some unitgroup and pick all these units instead (dunno if it will work like that cause I am to lazy to totally understand how your system works :p )
-no option to disable floating text (would be easy to change the group stuff but the trigger would still create the texts which is unnecessary in this case)

+it seems like all leaks which can be removed with GUI easily are removed
+documentation
+I like it, might make my own in case I am going to need something like that
 
i liked the system and had no problems to open it...
it may be useful for some people but like D4RK G4ND4LF already said add an option for the floating texts!!
in addition the waiting time of 10(!) seconds after combat is much too long!!
every mapper can customize that easy, but as i tested the system i ordered a fighting soldier to run away while the creeps were still fighting other guys (= he leaves the combat) but there was no signal from your system and i thought you made something wrong^^
set the time in your test map to 4 seconds... that would be much better!!
anyway good system 4/5
 
Level 19
Joined
Aug 16, 2007
Messages
881
cannot open it with WORLD EDITOR ... this system can't be approved :)

Are you sure that you've updated to patch 1.24?

D4RK_G4ND4LF said:
I can open it but I also had problems with lots of other spells I could not open :/
-however picking al units in playable map area twice every second might be lethal for performance
you may add all units in combat to some unitgroup and pick all these units instead (dunno if it will work like that cause I am to lazy to totally understand how your system works :p )
-no option to disable floating text (would be easy to change the group stuff but the trigger would still create the texts which is unnecessary in this case)

+it seems like all leaks which can be removed with GUI easily are removed
+documentation
+I like it, might make my own in case I am going to need something like that

Yes, by picking all units in the map may cause alittle lagg. I'll see what I can do about it, maybe add all combat units into an unit group.

I can add a option of the combat texts should appear or not, or else you can simply set the "EnteringCombatText = "" " and "LeavingCombatText = "" " :)

Thanks for the feedback, I'll try update this soon. +rep :)

The_Witcher said:
i liked the system and had no problems to open it...
it may be useful for some people but like D4RK G4ND4LF already said add an option for the floating texts!!
in addition the waiting time of 10(!) seconds after combat is much too long!!
every mapper can customize that easy, but as i tested the system i ordered a fighting soldier to run away while the creeps were still fighting other guys (= he leaves the combat) but there was no signal from your system and i thought you made something wrong^^
set the time in your test map to 4 seconds... that would be much better!!
anyway good system 4/5

I'll fix an option for the combat texts :) And about the 10 seconds to leave the combat can you easily chance by setting
  • Set TheTimeBeforeLeavingCombat = 10.00
to another number.

Thanks for the feedback and I'll update the system ASAP, +rep


I've updated this system from version 1.0a to 1.0b. Read the change log to read what I've fixed and added.


Version 1.0a
- #Release

Version 1.0b
- #Added an option that allow you to change if the floating combat texts will appear or not.
- #Fixed an issue that units didn't left the combat when they ran away.
- #Reduced the lagg by changing the unit group pick. Now ONLY the units in combat will be picked, not everyone.
 
Last edited:
Level 19
Joined
Aug 16, 2007
Messages
881
Very nice system, altho some things i dont like about it are:
- when attacking 2 units and 1 dies, you go out of combat immediately even tho the other one isnt dead yet.
- spells dont trigger you going into combat

Thanks for the comment. I knew about the first thing you said, but the seconds thing didn't I know. I'll have to try fix that :) +rep
 
Level 2
Joined
Dec 14, 2008
Messages
21
Well, what I would suggest is adding a second trigger replacing all instances of attacked/attacking with target of cast and the caster of an ability. There's the event for it. Also, add a condition to the trigger to check that the target of the ability being cast is an enemy of the caster of the ability, I believe those are in there somewhere :D

Hopefully 5 months isn't too long :D
 
Top