• 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.

Custom damage function

Status
Not open for further replies.
Level 4
Joined
Mar 27, 2008
Messages
112
Well I tried making a damage function so I could easily deal damage. I figured out I should probably make use of catalog function but I have no idea how I would make a unit deal a variable amount of damage to another unit. So how would I do that with catalogs? Or anything else that is easier:p or better idk:p?

Thanks
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
make an effect that does 1 damage and store the variable as an integer than do the 1 damage affect (integer) times lol
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Yes, its a native that allows you to get a player or unit to use an effect on a point or unit.

There are 4 of them in total, 2 for source kind and 2 for target kind.

Illidans911, that method is stupid and not advisable because large damage ammounts wil result in a opperation number error (incorrect damage and red text spam) as well as waste processing resources.

Its far easier and efficent to use catalogues to edit a custom damage effect's damage field to the ammount of damage you want done and then applying the effect.
 
Level 5
Joined
Jul 10, 2010
Messages
124
In War3 there was a "damage target" function, and it seems a lot simpler.

Is there a reason it has become this way in SC2? Does it allow more flexibility or something? The "cause x to damage y with attack type z" seemed like a lot simpler function.
 
Status
Not open for further replies.
Top