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

Portal Spell v0.1

A spell in which a hero opens 2 portals and sends dark missiles to damage the target area, when the portal dies it deals damage.
  • Portal Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Portal
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Portal_Index[1] Equal to 0
        • Then - Actions
          • -------- /\ Checks to see if any portal spells are running when the spell is casted, if not it turns on the loop trigger/\ --------
          • Trigger - Turn on Portal Loop <gen>
        • Else - Actions
      • -------- \/ Let Portal_Index[1] Stand for how many Portal spells are running at once\/ --------
      • Set Portal_Index[1] = (Portal_Index[1] + 1)
      • -------- \/ Let Portal_Index[2] Stand for how many Portal spells are have been casted\/ --------
      • Set Portal_Index[2] = (Portal_Index[2] + 1)
      • -------- \/Tells whether or not the spell is casting, if this were not here the spell would be running when you did not cast it\/ --------
      • Set Portal_LoopIsOn[Portal_Index[2]] = True
      • -------- \/Controls where the first portal is placed\/ --------
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempLoc2 = (TempLoc offset by 225.00 towards (Facing of (Triggering unit)) degrees)
      • -------- /\Controls where the first portal is placed/\ --------
      • -------- \/ Casting Unit, if this were not here you could not control damage per level\/ --------
      • Set Portal_CastUnit[Portal_Index[2]] = (Triggering unit)
      • -------- \/ Center of first portal\/ --------
      • Set Portal_Point[Portal_Index[2]] = (Target point of ability being cast)
      • -------- \/ Center of second portal\/ --------
      • Set Portal_Point2[Portal_Index[2]] = (Position of (Triggering unit))
      • Unit - Create 1 Portal (-90) for (Triggering player) at TempLoc2 facing (Angle from TempLoc2 to TempLoc) degrees
      • -------- \/Sets the portal as a unit\/ --------
      • Set Portal_Portal[Portal_Index[2]] = (Last created unit)
      • Animation - Change (Last created unit)'s animation speed to 300.00% of its original speed
      • Animation - Change (Last created unit) flying height to 400.00 at 129.00
      • Animation - Play (Last created unit)'s birth animation
      • -------- /\Plays portals birth animation/\ --------
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
      • -------- /\Removal of leaks/\ --------
      • -------- \/Controls where the second portal is placed\/ --------
      • Set TempLoc = (Target point of ability being cast)
      • Set TempLoc2 = (TempLoc offset by 225.00 towards ((Facing of (Triggering unit)) - 180.00) degrees)
      • -------- /\Controls where the second portal is placed/\ --------
      • Unit - Create 1 Portal (-90) for (Triggering player) at TempLoc2 facing (Angle from TempLoc2 to TempLoc) degrees
      • -------- \/Sets the portal as a unit\/ --------
      • Set Portal_Portal2[Portal_Index[2]] = (Last created unit)
      • Animation - Change (Last created unit)'s animation speed to 300.00% of its original speed
      • Animation - Change (Last created unit) flying height to 400.00 at 129.00
      • Animation - Play (Last created unit)'s birth animation
      • -------- /\Plays portals birth animation/\ --------
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
      • -------- /\Removal of leaks/\ --------
  • Portal Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Portal_Index[3]) from 1 to Portal_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Portal_LoopIsOn[Portal_Index[3]] Equal to True
            • Then - Actions
              • Set Portal_Timer[Portal_Index[3]] = (Portal_Timer[Portal_Index[3]] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Portal_Timer[Portal_Index[3]] Greater than or equal to 31
                      • Missile_UpNum[Portal_Index[3]] Less than 10
                • Then - Actions
                  • -------- SENDING MISSILES UP --------
                  • -------- /\Since portal birth animation speed is at 300% and the time it takes to complete it is 9.3, you need to wait 3.1 seconds before you start sending missiles into the portal/\ --------
                  • Set Missile_UpNum[Portal_Index[3]] = (Missile_UpNum[Portal_Index[3]] + 1)
                  • -------- /\Makes sure there is a max of 10 missiles sent per portal /\ --------
                  • Set TempLoc2 = (Portal_Point2[Portal_Index[3]] offset by 200.00 towards (36.00 x (Real(Missile_UpNum[Portal_Index[3]]))) degrees)
                  • -------- /\Makes missiles spawn in a circular motion /\ --------
                  • Unit - Create 1 Missile Up for (Owner of Portal_CastUnit[Portal_Index[3]]) at TempLoc2 facing Default building facing degrees
                  • Animation - Change (Last created unit) flying height to 350.00 at 666.00
                  • Unit - Add a 0.45 second Generic expiration timer to (Last created unit)
                  • -------- /\math since it the unit is traveling 300 flying height at .45 sec, 300/0.45=666/\ --------
                  • Custom script: call RemoveLocation(udg_TempLoc2)
                  • -------- /\Removal of leaks/\ --------
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Portal_Timer[Portal_Index[3]] Greater than or equal to 41
                      • Missile_DownNum[Portal_Index[3]] Less than 10
                • Then - Actions
                  • -------- SENDING MISSILES DOWN --------
                  • Set Missile_DownNum[Portal_Index[3]] = (Missile_DownNum[Portal_Index[3]] + 1)
                  • -------- /\Makes sure there is a max of 10 missiles sent per portal /\ --------
                  • Set TempLoc2 = (Portal_Point[Portal_Index[3]] offset by 200.00 towards (36.00 x (Real(Missile_DownNum[Portal_Index[3]]))) degrees)
                  • -------- /\Makes missiles spawn in a circular motion /\ --------
                  • Unit - Create 1 Missile Down for (Owner of Portal_CastUnit[Portal_Index[3]]) at TempLoc2 facing Default building facing degrees
                  • Animation - Change (Last created unit) flying height to 50.00 at 666.00
                  • Unit - Add a 0.40 second Generic expiration timer to (Last created unit)
                  • -------- /\Timer changed to .40 because timer goes at every .10 second/\ --------
                  • Custom script: call RemoveLocation(udg_TempLoc2)
                  • -------- /\Removal of leaks/\ --------
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Portal_Timer[Portal_Index[3]] Greater than or equal to 45
                      • Portal_Timer[Portal_Index[3]] Less than or equal to 55
                • Then - Actions
                  • -------- MISSILE DAMAGE --------
                  • Set Portal_DamageNum[Portal_Index[3]] = (Portal_DamageNum[Portal_Index[3]] + 1)
                  • -------- /\ Makes sure it only damages for 10 missiles --------
                  • Set TempLoc2 = (Portal_Point[Portal_Index[3]] offset by 200.00 towards (36.00 x (Real(Portal_DamageNum[Portal_Index[3]]))) degrees)
                  • -------- /\Makes damage spawn in a circular motion /\ --------
                  • Set TempRegion = (Region centered at TempLoc2 with size (192.00, 192.00))
                  • Set TempUnitGroup = (Units in TempRegion matching (((Matching unit) belongs to an enemy of (Owner of Portal_CastUnit[Portal_Index[3]])) Equal to True))
                  • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
                    • Loop - Actions
                      • Unit - Cause Portal_CastUnit[Portal_Index[3]] to damage (Picked unit), dealing (100.00 x (Real((Level of Portal for Portal_CastUnit[Portal_Index[3]])))) damage of attack type Spells and damage type Normal
                  • Custom script: call RemoveLocation(udg_TempLoc2)
                  • Custom script: call RemoveRect(udg_TempRegion)
                  • Custom script: call DestroyGroup(udg_TempUnitGroup)
                  • -------- /\Removal of leaks/\ --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Portal_Timer[Portal_Index[3]] Equal to 50
                    • Then - Actions
                      • -------- SPECIAL EFFECTS --------
                      • Special Effect - Create a special effect at Portal_Point[Portal_Index[3]] using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Portal_Timer[Portal_Index[3]] Equal to 56
                • Then - Actions
                  • -------- Kills first portal --------
                  • Animation - Change Portal_Portal[Portal_Index[3]]'s animation speed to 100.00% of its original speed
                  • Unit - Kill Portal_Portal[Portal_Index[3]]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Portal_Timer[Portal_Index[3]] Equal to 56
                • Then - Actions
                  • Set TempRegion = (Region centered at Portal_Point[Portal_Index[3]] with size (500.00, 500.00))
                  • Set TempUnitGroup = (Units in TempRegion matching (((Matching unit) belongs to an enemy of (Owner of Portal_CastUnit[Portal_Index[3]])) Equal to True))
                  • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
                    • Loop - Actions
                      • Unit - Cause Portal_CastUnit[Portal_Index[3]] to damage (Picked unit), dealing (50.00 x (Real((Level of Portal for Portal_CastUnit[Portal_Index[3]])))) damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIil\AIilTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveRect(udg_TempRegion)
                  • Custom script: call DestroyGroup(udg_TempUnitGroup)
                  • Animation - Change Portal_Portal2[Portal_Index[3]]'s animation speed to 100.00% of its original speed
                  • -------- /\Removal of leaks/\ --------
                  • -------- \/Kills second portal\/ --------
                  • Unit - Kill Portal_Portal2[Portal_Index[3]]
                  • -------- \/RESETTING ALL VARIABLES\/ --------
                  • Set Portal_Timer[Portal_Index[3]] = 0
                  • Set Portal_LoopIsOn[Portal_Index[3]] = False
                  • Set Missile_DownNum[Portal_Index[3]] = 0
                  • Set Missile_UpNum[Portal_Index[3]] = 0
                  • Set Portal_Index[1] = (Portal_Index[1] - 1)
                  • Custom script: call RemoveLocation(udg_Portal_Point[udg_Portal_Index[3]])
                  • Custom script: call RemoveLocation(udg_Portal_Point2[udg_Portal_Index[3]])
                  • -------- /\Removal of leaks/\ --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Portal_Index[1] Equal to 0
                    • Then - Actions
                      • -------- /\Checks to see if any portal spells are being casted --------
                      • -------- \/RESETTING ALL VARIABLES\/ --------
                      • Set Portal_Index[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
Changelog
v0.1- spell uploaded

Keywords:
portal, dark, missile, damage, spell, portal spell, dark missile
Contents

Portal Spell (Map)

Reviews
15:41, 20th Dec 2009 TriggerHappy: Review for Spell I don't see the point of having two portals, one of them seemed idle to me. Anyways, the rest seemed fine. Status Feel free to message me here if you have any issues with...

Moderator

M

Moderator

15:41, 20th Dec 2009
TriggerHappy:

Review for Spell

I don't see the point of having two portals, one of them seemed
idle to me.

Anyways, the rest seemed fine.

Status

Feel free to message me here if you have any issues with
my review or if you have updated your resource and want it reviewed again.

Approved
 
Level 9
Joined
Jan 17, 2009
Messages
372
I only checked the first trigger...

  • Set TempLoc = (Target point of ability being cast)
Why do you set this again? You already have it saved to another variable?

Thanks for catching that mistake, i will update when i am able.
agreed the portal point is alrdy set to the target

the damage should be set into a variable in the cast trigger ...
why should i add another variable to it when it is so easy just to change the damage action?
(please tell me if there is a reason, i dont mean to sound sarcastic)
 
Top