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

Spell depends on int

Status
Not open for further replies.
Level 9
Joined
Jul 18, 2005
Messages
320
Dunno never done something like that, but I'll give ya a few tips:
- Try messing around with GUI, I know you can do something like that. (Cause i know an very good GUIer whos knows JASS, but make fantastic things iwth GUI)
- Makes sure you test it once you thought you got it.

-Av3n
 
Level 13
Joined
Jun 22, 2004
Messages
783
You should do something like this.

Save the amount of points in a integer variable when the hero starts casting the ability.

Set "your integer variable" = (Intelligence of "your unit" (Exclude bonuses))

Then you need to deal the damage to the unit that it is being dealt to by changing the integer value to a real value.

Unit - Set life of ("The damage taking unit") to ((Life of ("The damage taking unit")) - (Real("your integer variable")))

That should do the trick.
 
Level 6
Joined
Oct 23, 2006
Messages
223
Hmmm use that kind of trigger all the time since all the offensive spells in my new map project uses attributes as damage and not a set amount. Anyways Warnicro, your method would not credit the damaging hero as the source of the kill and you dont have to put it in a variable.

I'd do it this way:
Event - unit starts the effect of a spell
Condition - spell being cats is equal to ____
Action - Order casting unit to damage target unit of ability being cast dealing real(intelligence of casting unit including bonuses) +/x (watever here for spell levels ex. level 2=x2 level 3=x4)

For spells such as warstomp use the action:
pick every unit within x range of casting unit and do actions
if picked unit belongs to an ally of owner of casting unit
Then Order casting unit to damage picked unit dealing real(intelligence of hero including bonuses)
Else do nothing

for spells such as shockwave use the action:
{for this example let us use a 1000 range shockwave}
Set Variable = 0.00
For every integer A from 1 to 10 do actions:
-Pick every unit within 100 of position of casting unit offset by Variable towards facing unit degrees
---/If/ picked unit belongs to an ally of owner of casting unit
---/Then/ Order casting unit to damage picked unit dealing real(intelligence of hero including bonuses)
---/Else/ do nothing
Set Variable = Variable + 100

there finished!
 
Level 13
Joined
Jun 22, 2004
Messages
783
Not sure where you get that action from, but I guess its the action called "Damage target" right.

If so, then fully write out the trigger cause you didn't, and you know that it will clash with the armor of the attacked unit they way you described it atm.
 
Level 6
Joined
Oct 23, 2006
Messages
223
is it suppose to clash with armor or not? im not sure wat he wants...anyways i know spells dmg are reduced from armor so i used dat one. The method u described is in fact the only way i know to deal direct damage dat does not get affected by armor. Do u have any methods of crediting the kill? I've always had dat problem in my maps when dealing damage that disregards armor....
 
Status
Not open for further replies.
Top