• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

[Trigger] Hero spells Mui

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
i tried to make a mui spell but im not sure!!!maybe some1 with more experience could tell me if i did something wrong!!
  • sakura slam mui Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sakura Power Slam
    • Actions
      • Set SakT[1] = (Position of (Casting unit))
      • Set UNITGRUP[31] = (Units within 1000.00 of SakT[1] matching (((Picked unit) belongs to an enemy of (Triggering player)) Equal to True))
      • Set Sakstr = (Agility of (Triggering unit) (Exclude bonuses))
      • Set SAoe = (Real((Level of (Ability being cast) for (Triggering unit))))
      • Set SdTarget = ((Real(Sakstr)) x 2.00)
      • Set SdAoe = 700.00
      • Set SAKR[5] = (8.50 x (SAoe x (SdTarget + 150.00)))
      • Unit Group - Pick every unit in UNITGRUP[31] and do (Unit - Cause (Casting unit) to damage (Matching unit), dealing SAKR[0] damage of attack type Chaos and damage type Normal)
      • Environment - Create a 3.00 second Normal ripple deformation at SakT[1] with starting radius 0.00, ending radius 1000.00, and depth 300.00, using 1.00 second ripples spaced 512.00 apart
      • Environment - Create a 3.00 second Temporary crater deformation at SakT[1] with radius 1024.00 and depth 128.00
      • Unit - Create 1 Detonate for (Triggering player) at SakT[1] facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to UNITGRUP[31]
      • Unit Group - Pick every unit in UNITGRUP[31] and do (Actions)
        • Loop - Actions
          • Unit - Cause (Casting unit) to damage (Picked unit), dealing SAKR[5] damage of attack type Spells and damage type Normal
      • Destructible - Pick every destructible within SdAoe of SakT[1] and do (Actions)
        • Loop - Actions
          • Destructible - Kill (Picked destructible)
      • Unit - Create 1 Transformation effect for (Triggering player) at SakT[1] facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Normal Hit for (Triggering player) at SakT[1] facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Dummy power up for (Triggering player) at SakT[1] facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 dummy aura for (Triggering player) at SakT[1] facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_SakT[1])
      • Custom script: call DestroyGroup(udg_UNITGRUP[31])
      • Set SdAoe = 0.00
      • Set Sakstr = 0
      • Set SdTarget = 0.00
 
Level 8
Joined
Mar 12, 2008
Messages
437
It's probably because "Casting unit" is lost during the unit group picking. There are two options:
1. Store Casting unit into a variable.
2. Use Triggering unit instead.

Also, use "Owner of Triggering unit" instead of just "Triggering player", since "Triggering player" only works when a player is triggering the event, which it isn't in this case.

That's all I can think of.
 
Level 9
Joined
Apr 25, 2009
Messages
468
  • Set UNITGRUP[31] = (Units within 1000.00 of SakT[1] matching (((Picked unit) belongs to an enemy of (Triggering player)) Equal to True))
Is bug...
Make it like this:
  • Set UNITGRUP[31] = (Units within 1000.00 of SakT[1] matching ((Matching unit) belongs to an enemy of (Triggering player)) Equal to True))

  • Pick every unit in UNITGRUP[31] and do (Unit - Cause (Casting unit) to damage (Matching unit), dealing SAKR[0] damage of attack type Chaos and damage type Normal)
Also bug...
Make it like this:

  • Pick every unit in UNITGRUP[31] and do (Unit - Cause (Casting unit) to damage (Picked unit), dealing SAKR[0] damage of attack type Chaos and damage type Normal)
 
Level 10
Joined
Feb 20, 2008
Messages
448
really thanks!!! i didnt saw those error last day was really tired,might fix the glitch really thanks ^^

but i needed to know should i use
  • Unit Group - Pick every unit in UNITGRUP[31] and do (Unit - Cause SakHero[1] to damage (Picked unit), dealing SAKR[5] damage of attack type Chaos and damage type Normal)
or
  • Unit Group - Pick every unit in UNITGRUP[31] and do (Actions)
    • Loop - Actions
      • Unit - Cause (Casting unit) to damage (Picked unit), dealing SAKR[5] damage of attack type Spells and damage type Normal
 
Status
Not open for further replies.
Top