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

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.
 
Level 15
Joined
Dec 18, 2007
Messages
1,098
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