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

Quick spell Help

Status
Not open for further replies.
Level 10
Joined
Apr 4, 2011
Messages
579
im just asking if anyone knows how to do the following effect...

for example im using the thunderclap effect:

when i use a spell it creates thunder claps around the caster in a circle about 400 offset...

what i want to know is how to do that effect but make the thunderclaps spawn one after the other around the caster instead of all at once
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Looping Technique
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set CasterLoc = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Wait 0.25 seconds
          • Set LocSFX = (CasterLoc offset by 400.00 towards ((Real((Integer A))) x 60.00) degrees)
          • Special Effect - Create a special effect at LocSFX using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_LocSFX)
      • Custom script: call RemoveLocation(udg_CasterLoc)
However, this trigger is not MUI.
 
  • Looping Technique
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set CasterLoc = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Wait 0.25 seconds
          • Set LocSFX = (CasterLoc offset by 400.00 towards ((Real((Integer A))) x 60.00) degrees)
          • Special Effect - Create a special effect at LocSFX using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_LocSFX)
      • Custom script: call RemoveLocation(udg_CasterLoc)
However, this trigger is not MUI.

please don't post stuff like that
people will think that it would be okay and write similar bad spells
something like this shed the rumor that the GUI "For each Integer A" loop would be bugged (which is wrong) because every other trigger which uses integer a might be fucked up because of that trigger

  • ThunderClapCircle
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Custom script: local unit caster = GetTriggerUnit()
      • Custom script: local real x = GetUnitX(caster)
      • Custom script: local real y = GetUnitY(caster)
      • Custom script: local string effectPath = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
      • Custom script: local real radius = 400.0
      • Custom script: local integer thunderclaps = 6
      • Custom script: local real angleDifference = 3.1415926*2/thunderclaps
      • Custom script: local real angle = 0.0
      • Custom script: loop
      • Custom script: exitwhen thunderclaps <1
      • Custom script: set thunderclaps = thunderclaps - 1
      • Custom script: set angle = angle + angleDifference
      • Custom script: call DestroyEffect(AddSpecialEffect(effectPath, x+Cos(angle)*radius, y+Sin(angle)*radius))
      • Wait 0.01 game-time seconds
      • Custom script: endloop
      • Custom script: set caster = null
this would be MUI but because of the wait the speed can't be increased further
everything else would require at least two triggers and a lot of more work
 

Attachments

  • ThunderClapCircle.w3x
    12.8 KB · Views: 44
Status
Not open for further replies.
Top