• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I need a spell....

Status
Not open for further replies.
Level 2
Joined
Jun 26, 2004
Messages
12
Hi, does anyone know how 2 make a spell like War Club but instead of killing trees it kills a friendly unit to gain additional damage for a number of strikes I tried changing the War Club into targeting friendly organic ground units but the game crashed every time i tried to used it.........

So can anyone gimme some idea on how 2 do it and thx very much.......
 
Level 2
Joined
Mar 9, 2004
Messages
39
this is actually very easy
first take a spell say like stormbolt
change damage to 999999
make it target ally units

Make a unit with the same model as the unit that is going to cast the ability and everything but more damage

then create this trigger:

Events:
a unit begins casting an abillity

Conditions:
Casting Abillity= to the abillity

Events:
Replace triggering unit with the unit (more damaging unit) using the old units realitive health and mana
:wink:
 
Level 2
Joined
Jun 26, 2004
Messages
12
Well, that wasnt exactly what i wanted u see the war club spell is the NE's Mount Giant spell that kills a tree and it gains +40 dam per strike up 2 15 strikes. I tried to change it into a hero spell allowing the hero 2 kill a friendly unit instead of trees and and bouns dam per strike up 2 a no. of strikes.

What u r suggesting here is that i ask my hero to stormbolt kill a unit and then replace my hero with a higher damaging hero of the same type using the same health and mana.I know this is good but how r u planing the resverse the hero back when the no. of strikes r up. i dont remember seeing any triggers that counts how many times a unit had attacked.........
 
Level 13
Joined
May 5, 2004
Messages
1,330
OK, here an idea:

Create an Real Variable for your hero (here called it "WarClubHits"), as long as there's a limit for every player on how much heros able to cast that ability he can build. Without limit, it's very hard to create enough variables :wink:

WarClubCreateCastRefer
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to [Your Ability]
Actions
Unit - Replace (Killing unit) with a [Unit with Damage Bonus] using The old unit's relative life and mana


WarClubHitCounter
Events
Unit - A unit Is attacked
Conditions
WarClubHits Less than 15.00
(Unit-type of (Attacking unit)) Equal to [Unit with Damage Bonus]
Actions
Set WarClubHits = (WarClubHits + 1.00)
Wait 0.01 seconds <- don't think it's necessary, but simply added a wait action
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WarClubHits Greater than or equal to 15.00
Then - Actions
Set WarClubHits = 0.00
Unit - Replace (Attacking unit) with a [Unit without Damage Bonus] using The old unit's relative life and mana
Else - Actions
Do nothing
 
Status
Not open for further replies.
Top