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

attributed based LINE spell

Status
Not open for further replies.
Level 3
Joined
Jan 31, 2012
Messages
26
HI There can anyone give some direction about how can i do it? exemple i'm needing a line spell but whith attribute damage u know jut like ALLERIA'S POWERSHOT on DOTA but with attribute damage not fixed damage.
i'm gratefull if can anyone help ^^
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
the spell needs to be fully triggered.
if you're okay with that, then i'll start creating the ability.

just want to tell you that it's impossible without using trigger.
so i'm waiting for your confirmation whether you want to use trigger or not.

and you need to have a little bit (or much) knowledge of using triggers.
 
Level 10
Joined
Jun 6, 2007
Messages
392
Here's how I would make it:

You will need a global variable SpellGroup.

Following things need to be saved in a hashtable:
  • Casting unit cu
  • Dummy unit du
  • Damage d
  • Cast Point cp
  • Target point tp
  • Counter c (number of loop executions)
  • Damaged units g (group, only if you don't want the spell to hit same targets twice)
Create a setup trigger, add caster to SpellGroup and set values in a hashtable. If you're not familiar with hashtables, you will find tutorials on hive.

Create a loop trigger with a "every 0.04 seconds event". Pick all units in SpellGroup and do following actions
  • Load values from hashtable.
  • Set counter = counter - 1.
  • set cp = cp + 50 (can be any number) towards tp.
  • move du to cp.
  • pick all units in 100 (can be any number) of cp and add them to TempGroup.
  • Remove group g from group TempGroup.
  • Pick all units in TempGroup and do actions
    • if picked unit is an allowed target, make cu damage it by d.
    • add picked unit to g.
  • Save changed values to hashtable.
  • Check if c == 0, and do the necessary actions to end the spell.

This may not be very clear as I wrote this a bit in a hurry, but it should give you an idea how to do it. It isn't exactly linear, if it needs to be, I'll change it. Good luck.
 
Level 3
Joined
Jan 31, 2012
Messages
26
thank you everyone and twovenomous there is really no problem man i was already expecting the using of triggers and there is no problem with that cause i can modify whatever i want later (i know create some kind of skills whith triggers too XD) i was only asking cause i really was having no damn ideia of how i was going to do it ^^ so if u really wanna make the skill i can put your name on the credits too : )
 
Level 3
Joined
Jan 31, 2012
Messages
26
and herky really thx for your help i really understanded what you were trying to say and bro ... that should work ^^ aksokasokaok
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Theres an alot easier method..

just use Bribe's Damage Detection

use a custom dummy to cast the shockwave (make sure to set expiration > how long it takes for missle) (On creating the dummy, disable the unit indexer, set the index of the dummy to the index of the caster, re-enable the indexer)

if source == dummy and level of shockwave for source > 0 then set damage = stat of uDexUnit[Custom Value of dummy]

e/ Also, never use shockwave. always carrion swarm (or some other line-damage)

why? Shockwave leaks.

e/ demo (yes i know i used shockwave)

  • Untitled Trigger 007
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dummy Channel Abil
    • Actions
      • Set UnitIndexerEnabled = False
      • Unit - Create 1 dumcaster for (Owner of (Triggering unit)) at PW_CasterPoint[0] facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
      • Set UnitIndexerEnabled = True
      • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Shockwave to (Last created unit)
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave PW_TempPoint[0]
  • Untitled Trigger 008
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DamageEventSource) Equal to dumcaster
          • (Level of Shockwave for DamageEventSource) Greater than 0
        • Then - Actions
          • Set DamageEventAmount = (Real((Strength of UDexUnits[(Custom value of DamageEventSource)] (Exclude bonuses))))
        • Else - Actions
though you have to set some variables like dumcaster and PW_CasterPoint[] to your own variables
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
^ Not MUI version. If the other unit also cast that ability during the time the missle is travelling, ur trigger will mess everything up. The best choice is to make a projective system and using Hashtable or Unit Indexer. :D
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
^ Not MUI version. If the other unit also cast that ability during the time the missle is travelling, ur trigger will mess everything up. The best choice is to make a projective system and using Hashtable or Unit Indexer. :D

how....

hero A casts spell, dummy gets assigned id of hero a
hero B casts spell, dummy gets assigned id of hero b

spell does damage to target c from hero a, damage goes to the id of the dummy which is hero A

spell does damage to target d from hero b, damage goes to the id of the dummy which is hero B
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
  • Set UnitIndexerEnabled = False
    • Set UnitIndexerEnabled = True
Ah, before say anything else, may I ask u what the above lines do?
 
Status
Not open for further replies.
Top