Warcraft III resources & community, 2003–2006 · archived

Several Spell Creation Questions

6 posts
#1

Several Spell Creation Questions

Hi guys, I have some spells which I cannot figure out how to make correctly, if anyone has any pointers please tell me.

1. Increased Damage Taken:
How exactly can you make Berserk a targetable spell, which has that attribute?

Alternatively, there is an event response called "Damage Taken" and I could potentially use that, except I cannot find a unit event called "unit takes damage"

2. Reduced Damage Taken from the Back
This is Rigwarl's spell from DotA; how exactly do you make this? I don't want something that gives you back life afterwards, because you could potentially take a 1000 damage hit and die before life is reinstated through trigger.

3. Updated Tooltip
An example of this would be Shadow Fiend's Necromastery from DotA. The tooltip would be updated everytime the Shadow Fiend stores a soul (At the bottom it would say "+xx bonus damage".

4. Shared Cooldown
Suppose I have spell A and B; if I cast spell A, spell B would also be on cooldown, and vice versa.

5. Multinstanceable channeling ability

Thanks guys.
#2
fefoxyHow exactly can you make Berserk a targetable spell, which has that attribute?


i dont think you can

fefeoxyAlternatively, there is an event response called "Damage Taken" and I could potentially use that, except I cannot find a unit event called "unit takes damage"


its only a specific unit event, there is no generic equivelant

fefoxyThis is Rigwarl's spell from DotA; how exactly do you make this? I don't want something that gives you back life afterwards, because you could potentially take a 1000 damage hit and die before life is reinstated through trigger.


well,

fefoxyI don't want something that gives you back life afterwards


that is exactly what DotA's spell does.

fefoxyAn example of this would be Shadow Fiend's Necromastery from DotA. The tooltip would be updated everytime the Shadow Fiend stores a soul (At the bottom it would say "+xx bonus damage".


alot of engineering upgrade levels and Necromastery levels.

fefoxySuppose I have spell A and B; if I cast spell A, spell B would also be on cooldown, and vice versa.


spellbooks.

fefoxyMultinstanceable channeling ability


JASS.
#3
can you be a little bit more specific about the use of spellbook? I semi-solved the problem with multi-instanceable channeling spell.

Is there anything called "unitid" that can be stored as custom value? I have a skill which associates another living unit with my hero permanently; and every other skill she can cast can affect her "partner unit".
#4
Spellbooks? if you put them in a spellbook and Check 'Shared Cooldown' the entire contents of the Spellbook will have to cool down

and as for the Unit ID thing, the correct formula is

H2I( whichUnit )

where H2I is

function H2I takes handle h returns integer
return h
return 0
endfunction
( of course you have to make it yourself )

to translate it back, the formula is I2U( whichInt )

where I2U is

function I2U takes integer i returns unit
return i
return null
endfunction
( you have to make this one yourself as well )
#5
fefeoxy wrote:
Alternatively, there is an event response called "Damage Taken" and I could potentially use that, except I cannot find a unit event called "unit takes damage"



its only a specific unit event, there is no generic equivelant


Thats a lie in WEU there is one and it is not a pick all unit and create spasific event I think.

All unit events are basicaly
ConvertPlayerUnitEvent(##)
ConvertUnitEvent(##)

Most of the numbers are unused thus I think one of them is the one that creates a player unit event.
#6
thats exactly what i used to say super, but you corrected me. You can make your own, but there is no default one, and WeU tends to clog up your map with useless funcs anyways.