• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Quick spell Help

Status
Not open for further replies.
Level 10
Joined
Apr 4, 2011
Messages
580
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.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
  • 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: 42
Status
Not open for further replies.
Top