• 🏆 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!

Need help with ShiggityShwa's Crystal Blizzard Spell

Status
Not open for further replies.
Level 1
Joined
Aug 7, 2005
Messages
2
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..
 
Status
Not open for further replies.
Top