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

Alot of special effects

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
How to create multiple special effects in an area arround a unit (when it casts a skills), example:


xxxxx
xxUxx _____ U is the unit, the X are the special effects. in my case I want to use
xxxxx _____ Naga Death, and make it in a 400 AoE arround
 
Level 25
Joined
May 11, 2007
Messages
4,650
set tempPoint1 = unit position of caster
for variable tempInt 1 to 6:
set tempPoint2 = tempPoint1 offset by 400 facing tempReal
set tempReal = tempreal + 60
special effect - create special effect at tempPoint2
special effect - destroy last created special effect (removes leaks)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Each special effect needs to be created separately. This is an iterative process so I would advise some kind of loop for efficiency. You may want to provide the functionality in the form of a function call to avoid possible procedural coupling if you need to create different special effects at different parts of your script.

Be aware that all created special effects should eventually be destroyed when no longer useful. This is not automatic so even if an animation makes it appear as if an effect is long gone it will still be there and consume system resources. This can lead to data management problems in the case of many effects in parallel which you need to solve.
 
Status
Not open for further replies.
Top