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

cast abilites without targeteting/help plz

Status
Not open for further replies.
Level 4
Joined
Jul 24, 2013
Messages
95
how to make a unit cast abilities without targeting the unit,for example player X click W hotkey for shockwave abilities,and it just cast it out without selecting its target,,how do i do it??cause im making hack n slash style...i want the skill to just cast it out,without selecting target...iv tried alot of stuff,but it still need to accuire target..1 rep for a helping hand...
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
  • Create a custom ability without a target (Preferably Channel).
  • Create a dummy unit with locust ability and blank to all stats.
  • Create the 'dummy' shockwave for your dummy unit (be sure to make the mana cost, casting time, and cooldown to 0).
  • Create a trigger like this:
    • Shockwave
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Shockwave (Instant)
      • Actions
        • Set Temp_Unit = (Triggering unit)
        • Set Temp_Player = (Owner of Temp_Unit)
        • Set Temp_Point = (Position of Temp_Unit)
        • Set Temp_Point2 = (Temp_Point offset by (Facing of Temp_Unit) towards (Facing of Temp_Unit) degrees)
        • Unit - Create 1 Dummy for Temp_Player at Temp_Point facing Default building facing degrees
        • Set Temp_Dummy = (Last created unit)
        • Unit - Add a 1.00 second Generic expiration timer to Temp_Dummy
        • Unit - Add Shockwave (Custom) to Temp_Dummy
        • Unit - Order Temp_Dummy to Orc Tauren Chieftain - Shockwave Temp_Point2
        • Custom script: call RemoveLocation( udg_Temp_Point )
        • Custom script: call RemoveLocation( udg_Temp_Point2 )
        • Custom script: set udg_Temp_Point = null
        • Custom script: set udg_Temp_Point2 = null
        • Custom script: set udg_Temp_Unit = null
        • Custom script: set udg_Temp_Dummy = null
  • Done.
Test map is attached if you're confuse.
 

Attachments

  • TestShockwave.w3x
    20 KB · Views: 41
Level 4
Joined
Jul 24, 2013
Messages
95
  • Create a custom ability without a target (Preferably Channel).
  • Create a dummy unit with locust ability and blank to all stats.
  • Create the 'dummy' shockwave for your dummy unit (be sure to make the mana cost, casting time, and cooldown to 0).
  • Create a trigger like this:
    • Shockwave
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Shockwave (Instant)
      • Actions
        • Set Temp_Unit = (Triggering unit)
        • Set Temp_Player = (Owner of Temp_Unit)
        • Set Temp_Point = (Position of Temp_Unit)
        • Set Temp_Point2 = (Temp_Point offset by (Facing of Temp_Unit) towards (Facing of Temp_Unit) degrees)
        • Unit - Create 1 Dummy for Temp_Player at Temp_Point facing Default building facing degrees
        • Set Temp_Dummy = (Last created unit)
        • Unit - Add a 1.00 second Generic expiration timer to Temp_Dummy
        • Unit - Add Shockwave (Custom) to Temp_Dummy
        • Unit - Order Temp_Dummy to Orc Tauren Chieftain - Shockwave Temp_Point2
        • Custom script: call RemoveLocation( udg_Temp_Point )
        • Custom script: call RemoveLocation( udg_Temp_Point2 )
        • Custom script: set udg_Temp_Point = null
        • Custom script: set udg_Temp_Point2 = null
        • Custom script: set udg_Temp_Unit = null
        • Custom script: set udg_Temp_Dummy = null
  • Done.
Test map is attached if you're confuse.
it works but it cast sideways no matter wht direction the unit is,it still cast sideways..lol
 
Level 3
Joined
Sep 9, 2009
Messages
658
Because he creates the dummy unit facing the default building facing degrees. You need to create the dummy facing the Hero's facing angle.

EDIT: Temp_Point2 is also unnecessary I think. You could just order the dummy to use shockwave at the Hero's position and it'll work normally.
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
I did a quick fix on UndeadImmortal's map.

  • Shockwave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave (Instant)
    • Actions
      • -------- ------- --------
      • -------- Variables for effiency --------
      • -------- ------- --------
      • Set Temp_Unit = (Triggering unit)
      • Set Temp_Player = (Owner of Temp_Unit)
      • Set Temp_Point = (Position of Temp_Unit)
      • Set Temp_Point2 = (Temp_Point offset by 100.00 towards (Facing of Temp_Unit) degrees)
      • -------- ------- --------
      • -------- Creating the dummy unit for the 'instant' shockwave --------
      • -------- ------- --------
      • Unit - Create 1 Dummy for Temp_Player at Temp_Point facing Default building facing degrees
      • Set Temp_Dummy = (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to Temp_Dummy
      • -------- ------- --------
      • -------- Ordering it to cast the shockwave in position of caster --------
      • -------- ------- --------
      • Unit - Add Shockwave (Custom) to Temp_Dummy
      • Unit - Order Temp_Dummy to Orc Tauren Chieftain - Shockwave Temp_Point2
      • -------- ------- --------
      • -------- Clearing leaks to avoid lag later in the game --------
      • -------- ------- --------
      • Custom script: call RemoveLocation( udg_Temp_Point )
      • Custom script: call RemoveLocation( udg_Temp_Point2 )
      • Custom script: set udg_Temp_Point = null
      • Custom script: set udg_Temp_Point2 = null
      • Custom script: set udg_Temp_Unit = null
      • Custom script: set udg_Temp_Dummy = null
You accidentally set this wrong
  • Set Temp_Point2 = (Temp_Point offset by (Facing of Temp_Unit)towards 0.00 degrees
Test map attached.

Because he creates the dummy unit facing the default building facing degrees. You need to create the dummy facing the Hero's facing angle.

Nah, the dummy can always turn to face the desired angle ;)
 

Attachments

  • TestShockwaveFixed.w3x
    19.9 KB · Views: 46
Level 3
Joined
Sep 9, 2009
Messages
658
Lol, you type fast Doomlord. I was editing my post when you replied. Anyway, why not just create the dummy at Temp_Point facing the Hero's facing angle and order it to use shockwave at Temp_Point as well? You can make do without Temp_Point2 then. Or is there an advantage to having Temp_Point2 that I'm missing?
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Lol, you type fast Doomlord. I was editing my post when you replied. Anyway, why not just create the dummy at Temp_Point facing the Hero's facing angle and order it to use shockwave at Temp_Point as well? You can make do without Temp_Point2 then. Or is there an advantage to having Temp_Point2 that I'm missing?

Nah I didn't think that far. I just fix up the wrong thing in UI's trigger ^^

Well, as the old saying goes, every way leads to Rome.
 
Level 4
Joined
Jul 24, 2013
Messages
95
I did a quick fix on UndeadImmortal's map.

  • Shockwave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave (Instant)
    • Actions
      • -------- ------- --------
      • -------- Variables for effiency --------
      • -------- ------- --------
      • Set Temp_Unit = (Triggering unit)
      • Set Temp_Player = (Owner of Temp_Unit)
      • Set Temp_Point = (Position of Temp_Unit)
      • Set Temp_Point2 = (Temp_Point offset by 100.00 towards (Facing of Temp_Unit) degrees)
      • -------- ------- --------
      • -------- Creating the dummy unit for the 'instant' shockwave --------
      • -------- ------- --------
      • Unit - Create 1 Dummy for Temp_Player at Temp_Point facing Default building facing degrees
      • Set Temp_Dummy = (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to Temp_Dummy
      • -------- ------- --------
      • -------- Ordering it to cast the shockwave in position of caster --------
      • -------- ------- --------
      • Unit - Add Shockwave (Custom) to Temp_Dummy
      • Unit - Order Temp_Dummy to Orc Tauren Chieftain - Shockwave Temp_Point2
      • -------- ------- --------
      • -------- Clearing leaks to avoid lag later in the game --------
      • -------- ------- --------
      • Custom script: call RemoveLocation( udg_Temp_Point )
      • Custom script: call RemoveLocation( udg_Temp_Point2 )
      • Custom script: set udg_Temp_Point = null
      • Custom script: set udg_Temp_Point2 = null
      • Custom script: set udg_Temp_Unit = null
      • Custom script: set udg_Temp_Dummy = null
You accidentally set this wrong
  • Set Temp_Point2 = (Temp_Point offset by (Facing of Temp_Unit)towards 0.00 degrees
Test map attached.



Nah, the dummy can always turn to face the desired angle ;)
Hah!this is exactly how i wanted,il give credit to the fixer n da maker,,thxx:goblin_yeah:
 
Level 4
Joined
Jul 24, 2013
Messages
95
Dammit! theres a problem again,when i cast da abilites in my custom map it create reincarantion shit stuff?WTF,lol,,i copied dummy,abilites,trigger,variable...so..wht cause it?
 
Level 4
Joined
Jul 24, 2013
Messages
95
It is probably your map, have you checked the abilities? Maybe the spell id are overriding the other spell.

@Doomlord, oh sry, didn't noticed xD
well i have 2 other custom shockwave in my map....hmhm could be,if it clash with this showckwave then wht do i do?
 
Status
Not open for further replies.
Top