• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] making passive ability

Status
Not open for further replies.
Level 2
Joined
Feb 21, 2014
Messages
18
right now im struggling with ability like bash. I figured out that it does not work like normal ability but since im green in making custom skills I dont know how to make passive. This one is probably whole wrong
  • Double Hit STR
    • Wydarzenia
      • Jednostka - A unit Rozpoczyna dziaĹ‚anie zdolnoĹ›ci
    • Warunki
      • (Ability being cast) RĂłwna siÄ™ Double Hit
    • Akcje
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Getting the Spell constants --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Set Double_Hit_Caster = (Triggering unit)
      • Set Double_Hit_Location = (Position of Double_Hit_Caster)
      • Set Double_Hit_Owner = (Owner of Double_Hit_Caster)
      • Set Double_Hit_Ability_Level = (Level of (Ability being cast) for Double_Hit_Caster)
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Setting the Spell values --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Set Double_Hit_STR = (SiĹ‚a of Double_Hit_Caster (NanieĹ› bonuses))
      • Set Double_Hit_DMG_Multiplayer = (0.35 x (Real((Level of Double Hit for Double_Hit_Caster))))
      • Set Double_Hit_DMG = ((Real(Double_Hit_STR)) x Double_Hit_DMG_Multiplayer)
      • Set Double_Hit_Dummy_Ability = Double Hit
      • Jednostka - Cause Double_Hit_Caster to damage (Target unit of ability being cast), dealing Double_Hit_DMG damage of attack type ZaklÄ™cia and damage type Nieznany
      • -------- Creating and setting floating text --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Tekst - Create floating text that reads ((String((Integer(Double_Hit_DMG)))) + !) above Double_Hit_Caster with Z offset 0.00, using font size 10.00, color (0.00%, 40.00%, 100.00%), and 0.00% transparency
      • Tekst - Change (Last created floating text): WyĹ‚Ä…cz permanence
      • Tekst - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Tekst - Change the fading age of (Last created floating text) to 3.00 seconds
      • Tekst - Change the lifespan of (Last created floating text) to 5.00 seconds
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Clearing Leaks --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_Double_Hit_Location)
my ability does not make dmg and because of that even my float text does not show :p. Can someone help me with passive skills. I hope I dont have to implement "chance on hit" in custom skills since it has to be something like "Bash" but without stun and with dmg from level and STR - so I've used "chance on hit" from editor
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
The passive ability doesn't have an effect event.

You should make the trigger have an event like this : 'Unit - A Unit is attacked'. You gain two things , Attacking Unit and Attacked Unit. We use Attacking Unit as a triggering unit and attacked unit as a target.

And then, you detect whether the attacking unit has the buff BASH, or not. If so, make a chance integer,if the integer hits the chance, make the attacked unit bashed. and complete your trigger.

Probably you will deal with buffs when you're with Passive abilities.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You should base it from another ability that does the same but instead of a stun it slows or deals damage over time.
Then you set the duration of the special effect to 0.01 and the effect to 0. Then you can determine if the unit that takes damage is hit by the bash ability.
You can stun the target via a dummy unit.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
In fact they are 3 different abilities... so he probably thought that he had to make a new thread for each and every one of them.

He could indeed give a second and third problem on his first thread but he didnt go for it.
If he had created one thread named something like "Need help with custom abilities." he could ask all his questions in there.
 
Level 13
Joined
Dec 21, 2010
Messages
541
After putting the event of Unit is Attacked ..add a condition which determines if the attacker has the passive ability..

Level of ability of (attacking unit) is greater than 0

///if the passive ability has chance just add

Math random between 1 and 100 is less than or equal to (CHANCE)

then create a dummy that has firebolt then order it to cast the attacked unit.

but having a DDS is much accurate rather than using "unit is attacked" because players can spam STOP when unit is attacking thus increasing chance to do the actions..
 
Status
Not open for further replies.
Top