HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Request: Shield System

01-02-2010, 08:10 AM#1
Zyrixion
This is quite a bit of a request, but here goes anyways: shadow1500's old Shield System was broken by the latest patch, as it used the old return bug, but it found well use in one of the maps I was developing and have returned to. I was wondering if either anyone could update it or perhaps produce one for the benefit of all, if the latter perhaps with the added functionality to perhaps 'heal' the shield by means other than its internal regen, and perhaps a way to set dynamic regeneration, such as being able to base the regen on how much shield strength is remaining. Anyways, this is just a request to anyone who's bored enough to do it, I really don't have anywhere close to the understanding of either JASS or programming to be able to do this myself, nor really the time to take on such a challenge, and I think it could benefit many people.

Cheers,
-Zyrixion
01-02-2010, 02:00 PM#2
Ciebron
There is a shield system here, http://www.wc3c.net/showthread.php?t...hlight=Adamage. But might be too advanced for you
01-03-2010, 03:51 PM#3
Zerzax
Try the one that has superseded that script.
01-03-2010, 06:01 PM#4
Zyrixion
Yeah, I'm afraid that it is a bit out of my league, with nothing to help me figure out what to do with it and how to use it. Which is a shame, because it looks like it would do just what I needed it to. What I liked about the one I mentioned before is the ease of use and implementation. Unless the others are fairly easy to work with as well, and I'm just getting overwhelmed trying to take in the code. I'm pretty good at reading code, but not too good at understanding higher level coding yet.
01-04-2010, 12:37 AM#5
thehellman
Shield systems aren't easy, and you even want more than a shield system. No one will just code one for fun. You'll have to either learn to use Anitarf's or make your own =/

I did a quick search for you and found this.
http://www.hiveworkshop.com/forums/s...Dlist%26r%3D20
01-04-2010, 01:14 AM#6
grim001
I could probably code a shield system using Anitarf's system in 5 minutes if you give me a detailed description of what you want it to do.
01-04-2010, 01:52 AM#7
Anitarf
Quote:
Originally Posted by thehellman
I did a quick search for you and found this.
http://www.hiveworkshop.com/forums/s...Dlist%26r%3D20
Unfortunately, that is one big bucket of fail.


Using DamageModifiers shouldn't be too hard, there's an example right in the documentation:
Expand JASS:

Okay, so this example shows how to make an armour that gives a flat damage reduction, but it's easy to convert the code into a shield:
Expand JASS:

So far, simple enough. When created, such a shield will block all damage until its hp runs out. Now to make it possible for a shield to only block a percentage of the damage, also, let's allow shields to have unlimited hp:
Expand JASS:

Now let's add hp regeneration (using TimerUtils):
Expand JASS:

This code should now be capable of handling most types of shields. Further additions could include stuff like shield special effects and limited shield durations, also, a more sensible implementation of regeneration would use a single timer, but this is all I have time for tonight.
01-09-2010, 03:37 AM#8
muse1988
Quote:
Originally Posted by grim001
I could probably code a shield system using Anitarf's system in 5 minutes if you give me a detailed description of what you want it to do.


I would like a spell similar to Power Word in WoW, where a unit has a temporary "shield" which absorbs damage but does not prevent.

So if Attacker deals 40 dmg to Shielded unit, and the Shield prevents 20, the other 20 does get dealt to Shielded Unit