|
|
#31 |
|
Corkscrew Chainsaw!!!
|
The issue with that method being that it kills copy/paste-ability. What... you want me to add the code for a damage type AND declare it in your system header? Lame :p
__________________Also, I wonder if this is force of habit, but the nulling of your trigger is not necessary. JASS:library OnExtraText requires DamageSystem //... public function InitTrig takes nothing returns nothing local trigger trg = CreateTrigger() call TriggerAddAction(trg, function Actions) call TriggerAddCondition(trg, Condition(function Conditions)) call TriggerRegisterDamageEvent(trg) set trg = null endfunction endlibrary But you are probably right about just declaring damage types in your system. It's useful for certain reasons, and detrimental for fewer. |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#32 |
|
Obscurity, the Art
|
You could actually declare them externally if you made some public variable that counts the number of damage types. The reason I didn't add such a variable is because it wouldn't be useful at all internally to the system, though I might add it for kicks. Then you could always get the "next index" without any trouble or conflicts, increment it, and declare your damage type variables anywhere you want to.
__________________ |
|
|
|
|
|
#33 |
|
Corkscrew Chainsaw!!!
|
It would function essentially the same way as H2I on a new location, but I suppose it would be cleaner to use a public function (since all these 'add-ons' would be made specifically for this system anyway).
__________________ |
|
|
|
|
|
#35 | |
|
Obscurity, the Art
|
Quote:
It probably wouldn't work for evasion at all, though, unless you had a system to trigger projectiles and attacks in general. I find both of those to be quite outside of the scope of this system, but still all valid points to consider for the future. Might be worth it to invest in a "Triggered Critical Strike System" some day. Hrm. |
|
|
|
|
|
|
#36 | |
|
requires vJass
Code Moderator
|
Quote:
You can remove the attack sounds from every unit in the map, then trigger them when hits are successful. I don't think a "Triggered Critical Strike System" is a good idea, proper handling of critical strike and evasion seem like two important areas for the damage detection system itself to tackle, or at least enable the user to handle. |
|
|
|
|
|
|
#37 |
|
master of fugue
Join Date: Jun 2007
Posts: 2,558
![]() ![]() ![]() ![]()
|
Systems that require that you do all thing custom to adjust to them can hardly be called systems.
__________________ORBEngine is better because it does all the things mentioned here and you don't have to make all spells custom, just the ones that you want to treat specially. |
|
|
|
|
|
#38 | ||
|
Obscurity, the Art
|
Quote:
Quote:
|
||
|
|
|
|
|
#39 | |
|
master of fugue
Join Date: Jun 2007
Posts: 2,558
![]() ![]() ![]() ![]()
|
Quote:
No you don't have to use orb's. Only unit that has orb-like attack needs to use orb, all other can use what ever they like. You seem to be under the wrong impression that ORBEngine automatically gives orb attack to all units on map like some older dd systems.. And it does not stand to reason that you can be bothered to use all custom spells but be too lazy to make your own custom orb attacks.... This really is not a system but a personal approach to mapping. One of biggest quality measures for systems is self sufficiency aka encapsulation. |
|
|
|
|
|
|
#40 | |||
|
Obscurity, the Art
|
Quote:
Quote:
Quote:
|
|||
|
|
|
|
|
#41 |
|
Free Software Terrorist
Technical Director
|
Orb method: Trigger all your orbs.
__________________This method: Trigger all your abilities. They sort of look the same to me. |
|
|
|
|
|
#42 |
|
Obscurity, the Art
|
Like I said, depends on the map, for some it might be less work to code abilities, for another it might be less work to code orbs. It's just in some cases maps may be using fully triggered spells anyways, whereas I can't think of an actual use for triggered orb abilities except to adjust for orb damage detect methods. That point, although valid, really doesn't have any value relative to the discussion at hand, though.
__________________ |
|
|
|
|
|
#43 |
|
Free Software Terrorist
Technical Director
|
You need to trigger orbs to make them stack correctly which was about the first actual use for attack detection I had.I really think both solutions are quite demanding, hence I think I might remake the original attackdetect engine which was merely an approximation... Regarding the system itself, its implementation is not bad, but I'd like to see UnregisterDamageEvent to either become O(1) or get out of there, before I approve it. Perhaps log(n) is good enough.
__________________ |
|
|
|
|
|
#44 |
|
Obscurity, the Art
|
I need to find the index of a trigger in an array knowing nothing but the trigger itself. I can't think of any other way to do it while still taking the trigger as the only argument. I mean, I could make the RegisterDamageEvent return the index integer and then force the user to use that returned integer upon Unregistering. That kind of ebbs away from the simple syntax I was aiming for though, do you have any other ideas?
__________________ |
|
|
|
|
|
#45 |
|
Free Software Terrorist
Technical Director
|
returning an index is not going to work, you would need to return a reference pointer, and probably use a linked list instead of an array.
__________________Anyway, if the user is doing something that requires to remove the trigger, his code is already quite complicated, saving the node would be as complicated for him as saving the trigger. You could also get rid of that function... There should be a way to invent syntax to allow the definition of damage types in compile time without having to modify your library. A compile-time allocator for structs should help. JASS:struct a endstruct globals constant a A_TYPE_MYDAMAGE1 = a.create() constant a A_TYPE_MYDAMAGE2 = a.create() endglobals JASS:globals constant integer A_TYPE_MYDAMAGE1 = 1 constant integer A_TYPE_MYDAMAGE2 = 2 endglobals edit: perhaps with something like enums, but being able to declare new values outside the library holding the enum is necessary, hmnn |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |