• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

damage and custom buff system

Status
Not open for further replies.
Level 10
Joined
Apr 9, 2004
Messages
502
Anyone know if such a thing exists?

I'm looking for a system which can detect damage from any attack and spell and distinguish from a spell ability, as well as be able to apply orb effects dependent on skills or items.

Perhaps someone could give me some advice on layout for such a system. I mainly trigger in .GUI but i mix with Jass, and if there's a system in Jass, I could probably figure it out and incorporate it into my own triggering.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
This covers the damage detection.

Distinguishing from a spell/attack is easy;

Step 1: Base an ability off the Frost Orb (or anything else)
Step 2: Add that ability to all units
Step 3: Inside the aforementioned AnyUnitTakesDamage function, check if the unit has that buff. If it does, remove it. (it was an attack) If not, it was a spell.
 
Level 10
Joined
Apr 9, 2004
Messages
502
I think I might have to in order to use these things effectively.

Perhaps you can train me (since i suck at using the tutorials and have a botched understanding of JASS as is from some knowledge in C++ as well as reading some custom Jass functions).

One thing; how do you guys setup doing your spells anyways? Do you just start typing in text as is and work it in from there or what? Do the programs you use make it really easy to do what you want or is everything a challenge each time? Ie, if you know how you want the spell to work, is coding actually that difficult?

perhaps you can show me an intro and then segment it to where they are currently in terms of jassing.

What I hope to eventually do is create a custom AoS which would have a few extra features that I think would only be available to be used in JASS.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
JASS is hard to understand at the beginning, but you learn exponentially (faster and faster). JASS has far more options than GUI, it's much easier to work in, and you can achieve smooth effects. It is very effective in spells.

What I do is create a trigger with an event 'A Unit starts the effect of an ability', then I add a condition 'Ability being cast equal to Some Spell'. Then I convert it all to JASS, put that script in a JASS editor (JassCraft) and optimize the converted script. Then I start scripting the spell.

Well, not every time a challenge is present, but most of the times. After a while, those challenges lose their 'challengeness' and it's easier to script every time, because you always learn something new. It's fun for me to see what I can create, to test my creativity.

The hardest part when making a big spell is debugging. When you create a big code and some error occurs in the spell when you test it (for me, it was a big error most of the times :p), then you have to find the problem in your big script. That might be hard if you don't know where to start looking. What you need to do is find out in which function the error occured and try to debug it. It was hard for me at first, but then I started using BJDebugMsg function that is very useful, and it helped a lot.

It's kind of a good feeling having your script organized and pretty :), not like crappy ol' GUI. GUI looks fine itself, but when converted to JASS........it hurts your eyes ;)

Now less and less errors occur in my scripts.......eventually I'm gonna be like Pooty, who can't make a mistake even if he wants to :). He knows every single thing about JASS, I hope to be like him eventually.......
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Well you cant add a custom buff on a unit with triggers (with GUI as I know)
But you can try dummy caster
I dont need to tell damage thing I guess (unit - damage target whatever)
for buff create a dummy caster to cast a buffer spell like
Example Ability name Confusioning Stab
This ability stabs a poisoned dagger to his enemy
Confusion make enemy misses for a time
(250 damage and a dummy unit casts curse with %50 miss for 15 seconds to target)
I dont know how to reduce leaks wtih this so
Purple can give you trigger
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Well you cant add a custom buff on a unit with triggers (with GUI as I know)
But you can try dummy caster
I dont need to tell damage thing I guess (unit - damage target whatever)
for buff create a dummy caster to cast a buffer spell like
Example Ability name Confusioning Stab
This ability stabs a poisoned dagger to his enemy
Confusion make enemy misses for a time
(250 damage and a dummy unit casts curse with %50 miss for 15 seconds to target)
I dont know how to reduce leaks wtih this so
Purple can give you trigger

Or he can learn JASS. One way or another, JASS is always on the finish, something always drags you to it (in most cases it's 'GUI pro-ness'). ABuff system is really easy to use, I don't know what's the big problem.
 
Level 10
Joined
Apr 9, 2004
Messages
502
Naw, it might not be that much difficulty to read when you read JASS coding, i really haven't looked to hard at it myself, but I'm wanting to learn some JASS beforehand. I guess I'll have to take it slow. Still, thanks for the tips so far, keep em coming.... *curls hand in charity gesture"
 
Level 10
Joined
Apr 9, 2004
Messages
502
New question: is it possible to keep track of all the variables attached to a one unit, so that I may be able to switch the values in between.

Ie: I have a one spell where a unit has a chance to go invis and leave behind a dummy unit while he is free to run without any targeting on him. AoE spells still hurt him, but anything that was targeting him as he activated this, would now target his dummy.

Only thing is, I'd need to know the variable that made him the target unit so I could switch him up. This is easy for 1-2 spells, but for 10,15,20+ i'd rather have a system in place.

so Is there any way to keep track of all the variables to which my unit is their assigned value?
 
Level 10
Joined
Apr 9, 2004
Messages
502
Ie say a unit casts a spell on another unit. That unit is your unit.

It creates a global unit variable called "targeted_UNIT_A" and assigns that variable to your unit, so that the spell will deal it's effects to your unit. Say a few spells are cast on your unit.

Now I want to be able to tell that if I take my unit, say his global variable that represents him would be "HERO_Ninja" or something. When the dodging ability fires, I'd need to detect (in this case) that the unit assigned to variable "HERO_Ninja" is also assigned the variable "targeted_UNIT_A", so that i can re-assign "targeted_UNIT_A" to a dummy clone created by the trigger.

Like i said, it's ok if I have only 1 ability to monitor, but if I have 20 or so, (for for example, 20 global unit variables linked to those twenty different spells) I can't rely on crude triggering to know which variables share the same unit.

I was wondering if there would be any method you can think of that could get me all the variables attached to my unit. he may be "HERO_Ninja" but I wanna see if he's also "current target of ability X" or "unit X taking Y dps over time"

hopefully that is more clear
 
Status
Not open for further replies.
Top