• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Need help with ShiggityShwa's Crystal Blizzard Spell

Status
Not open for further replies.

L0rdNemesis

L

L0rdNemesis

Okie so I imported the spell into my map and tried using it, but it caused a lot of lag.. cant find out why though.. here's the trigger

Crystal Shards
Events
Time - Every 0.25 seconds of game time
Conditions
Actions
-------- Set the second number equal to the number of heroes you set custom values for --------
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlizzadCheck[(Integer A)] Equal to True
Then - Actions
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Unit - Create 1 Blizzard Shard for (Player((Integer A))) at (Blizzard[(Integer A)] offset by (Random real number between 25.00 and 750.00) towards (Random angle) degrees) facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to (Integer A)
Unit - Add a 1.20 second Generic expiration timer to (Last created unit)
Animation - Change (Last created unit) flying height to 0.00 at 800.00
Else - Actions
Do nothing

Blizzard Ice
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Blizzard Shard
Actions
Set Ice_Fields = (Ice_Fields + 1)
Set TempPoint = (Position of (Dying unit))
Unit - Create 1 Ice Field Keeper for (Owner of (Dying unit)) at TempPoint facing Default building facing degrees
Custom script: call RemoveLocation( udg_TempPoint )
Unit - Set the custom value of (Last created unit) to Ice_Fields
Unit - Add Crystal Blizzard Unit Cast to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap

Blizzard Ice
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Blizzard Shard
Actions
Set Ice_Fields = (Ice_Fields + 1)
Set TempPoint = (Position of (Dying unit))
Unit - Create 1 Ice Field Keeper for (Owner of (Dying unit)) at TempPoint facing Default building facing degrees
Custom script: call RemoveLocation( udg_TempPoint )
Unit - Set the custom value of (Last created unit) to Ice_Fields
Unit - Add Crystal Blizzard Unit Cast to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
(I removed the ice terrain thingy because I didn't need it)

Stop Blizzard
Events
Unit - A unit Stops casting an ability
Conditions
(Ability being cast) Equal to Crystal Blizzard
Actions
Set BlizzadCheck[(Player number of (Owner of (Casting unit)))] = False

Crystal Blizzard
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to Crystal Blizzard
Actions
Set BlizzadCheck[(Player number of (Owner of (Casting unit)))] = True
Set Blizzard[(Custom value of (Triggering unit))] = (Position of (Triggering unit))

Well, that's all help would be greatly appreciated..
 
I'm sure it has to do with the trigger... It doesn't lag in the map with the spell in it...
 
Status
Not open for further replies.
Back
Top