• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Oposite of damage source

Status
Not open for further replies.
Level 22
Joined
Jan 10, 2005
Messages
3,426
Querty, I mean like: attacked unit's opposite is attacking unit.

Daelin, it doesnt work with triggering unit. This is my trigger:
EVENTS:
Any unit takes damage (WEU function)
CONDITIONS: Damage source has buff 'frost defense'
ACTIONS: create 1 'frost ball'
order last created unit to attack once triggering unit

PS: Daelin, I sent u a message, but u can delete that1, I alreadsy have my answer
 
Level 12
Joined
Apr 29, 2005
Messages
999
This is the big aonnying thing with that event in WEU. There is no event responding to the victim.
Yesterday I discovered a way to use Event Unit Takes Damage (or whateever it's named) but for ANY unit. Not just one that is selected in the editor. In the test trigger I let the game display the damage dealded every time a unit attacked another. Nothing big if you know how to use local triggers but I must say I was pretty proud of it. Of course this requires JASS.
Still I found it very annoying that in GUI you can't use a global variable when selecting which unit to be registered when damaged. Why only locals?
 
Level 12
Joined
Apr 29, 2005
Messages
999
With local triggers and variables it is multiinstanceable yes. BUT, it won't work good with evaison unless you figure out some way to simulate evasion.
What is the point of having the code if you don't know JASS?
 
Level 12
Joined
Apr 29, 2005
Messages
999
Yesterday I discovered a mega bug in the script and I had no idea how it could be fixed or even what actually caused the problems. Luckely I discivered that the script was calling a function infinity amount of times so the game crashed.
Enough about this, I have discovered some other major problems that I have probably solved but I need more work on it. This whole thing is far trickier than I thought. But I must say I am pretty exicent that I am so close to get this working. At this stage the script isn't a spell yet. It doesn't do anything interesting so there is no point that you have the code yet if you don't know JASS so you can continue on it.
And by the way, how excaclty is your spell supposed to work? My "spell" is used when a unit is attacked and by that way takes damage. Is the damage casused by spells also detected? I have never tested the GUI version so I don't know. Otherwise it will be real tricky to make it work on spell casts, if even possible. Test it and tell me.
I have a foggy idea of how to make this ablto work with evasion but it will be really tricky and completly out for non-JASSers.
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
My spell: A unit with a frost attack(a dummy at the position of the unit with buff 'forst defense'), attacks a unit that does damage to the unit with the buff 'frost defense'
It must not detect spells.
PS: What's with the evasion problem? With that JASS code of yours it detects damage right? so, if u evade it, u wont get damage and it wont be detected. or am I wrong now?
 
Level 10
Joined
Apr 9, 2004
Messages
502
It's possible to detect a one unit getting damaged via global variables in GUI, in fact, here is how: wait, no i don't wanna give away my secret. But i'll say this; with this secret you can make a custom critical stike or a decent evasion (which cannot seem to dodge orb damage/effects; this is because of how they hardcoded the real evasion)

But this has nothing to do with that. For an easier way, just get a dummy unit to cast frost sheild on the main unit. It will automatically slow units when they attack him. If you want a custom slow, use the same thing, just detect for the slowed buff and then replace it with the custom buff you want (via dummy units etc...)

but if you want to find the opposite, go under triggers -add event, and you'll find it there. That's the only way you can set it up to work.
 
Status
Not open for further replies.
Top