• 🏆 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!

[General] How to make a spank spell?

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
Each player controls a pig farm and a peon. The Pig farm spawns pigs. The pigs themselfes are harmless, but if enemy unit comes close to the pig farm, the peon can spank/whip the pig. The pig transforms into an angry red pig with an attack!

I need this to work without flaws. Can anyone please show the whole trigger to get this to work?

Step-by-step:

1. Peon have an ability called Spank.
2. Peons can only use it on a friendly pig.
3. The pig becomes red, big, angry and gets an attack.
 
Level 8
Joined
Jan 8, 2010
Messages
493
for the Spank spell, just create a custom spell that can only target a certain type. example is at your pig unit set Combat - Targeted As to Ancient, then at your Spank spell set Stats - Target Allowed to Ancient, Friend. i would suggest you base your Spank spell from a spell that provides a buff (even a 0.01 stun from Spank spell based from Storm Bolt) to know which pig is being spanked.

if you follow my suggestion (wait. read Maker's suggestion first on Hero Passive Transformation because it will be needed), base Spank from Storm Bolt, add a custom Spank buff, set duration to 0.01 (or maybe 0.1?). then use Weep's GDD (search for it in the Spells section) with the following trigger

  • Events
    • Game - GDD_Event becomes Equal to 0.00
  • Conditions
    • (GDD_DamagedUnit has buff Spank) Equal to True
  • Actions
    • Unit - Add PigTurnToRed to GDD_DamagedUnit
    • Unit - Remove PigTurnToRed to GDD_DamagedUnit
PigTurnToRed will be the ability you should have created with the Hero Passive Transformation. if you wish to have your pig return to being harmless pigs again, you will need to use an indexing system and a timer.
 
Level 8
Joined
Jan 8, 2010
Messages
493
^i also thought about it after i posted the reply. i forgot that Spank's supposed to be a targetable spell (not passive-buff-placing spell) XD
  • Events
    • Unit - Unit Starts the effect of an ability
  • Conditions
    • Ability being cast Equal to Spank
  • ...
 
Status
Not open for further replies.
Top