• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Defend your castle click damage

Status
Not open for further replies.
Level 4
Joined
Oct 6, 2007
Messages
70
hey its me
Im making a new easier map called Defend your castle its based off a X gen studios game and i want to make it into a warcraft III game.
i need a spell that when you click on a unit it does 20 damage and when you kill it you gain some exp. When you level up you get to pick an ability and if you pick more click damage it does 25 damage every time you click on a unit. So yea i hope you understand what im asking for. if not ill explain more.
level 1 = 20 damage level 2 = 25 level 3 = 30 and so on till level 20.
i could probly make this myself but i do not know how to make it so when drag select all units it doesnt hurt all of them.
 
Level 7
Joined
Apr 9, 2008
Messages
147
Code:
Events
A unit is selected
Conditions
Owner of Selecting Unit unequal to Player 1 Red (or any user)
Actions
Set life of selected unit to Life of Selected Unit - 20

Something like that. By the way this should be in the World Editor help forum.
 
My way is pretty much like Dakho's way.

  • Events
  • Unit- A unit is selected
  • Conditions
  • Player Comparison- Owner of Selecting Unit equal to Player 1 Red (or any user)
  • Actions
  • Unit- Cause (Castle or whatever unit) to damage selected unit for (15+(Level of Click Damage for (The unit or you can use research level)x5))
  • Selection- Deselect unit from selection of Player (Whatever) {This is to make it look better}
PS: If the unit that does damage is a building, you MUST set the gameplay constant (Advanced->Gameplay Constants) of whether a building kill grants exp to true.
 
Level 12
Joined
May 4, 2008
Messages
1,111
DONT FORGET to put also in conditions ''owner of selected unit is equal to (whoever is stickmans)''
or else he will destroy his castle
XD
and it would be more of in actions
Kill selected unit
 
Level 4
Joined
Oct 6, 2007
Messages
70
My way is pretty much like Dakho's way.

  • Events
  • Unit- A unit is selected
  • Conditions
  • Player Comparison- Owner of Selecting Unit equal to Player 1 Red (or any user)
  • Actions
  • Unit- Cause (Castle or whatever unit) to damage selected unit for (15+(Level of Click Damage for (The unit or you can use research level)x5))
  • Selection- Deselect unit from selection of Player (Whatever) {This is to make it look better}
PS: If the unit that does damage is a building, you MUST set the gameplay constant (Advanced->Gameplay Constants) of whether a building kill grants exp to true.

can you help me find where i can get the event "a unit is selected" ? sorry i just came back to WE a couple days ago im a bit rusty
 
Status
Not open for further replies.
Top