Need help help with this spell.

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Need help help with this spell.

Post by Black-Hole »

Im trying to make this work for the tower, but the spell only works for Reds tower.

There are only 4 players that need to use this spell in there tower (Red, Blue, Teal, and Purple) I also attached this in a map below.
Spoiler:
First Trigger

Code: Select all

CLspelltrig1
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Last Defence!
    Actions
        -------- Set up the variables --------
        Set CL_castpt = (Position of (Attacking unit))
        Set CL_tmppt = (Position of (Attacked unit))
        Set CL_real = (Angle from CL_castpt to CL_tmppt)
        Set CL_tarpt = (CL_castpt offset by 100.00 towards CL_real degrees)
        -------- Create the dummy --------
        Unit - Create 1 Dummy for (Owner of (Attacking unit)) at CL_tarpt facing CL_tmppt
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Attacked unit)
        Unit - Make (Last created unit) face CL_tmppt over 0.00 seconds
        Unit - Set level of Carrier  for (Last created unit) to 1
        -------- Creating a special effect --------
        Special Effect - Create a special effect at CL_castpt using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
        Set CL_tempeff = (Last created special effect)
        Custom script:   call DestroyEffect(udg_CL_tempeff)
        Custom script:   call RemoveLocation(udg_CL_castpt)
        Custom script:   call RemoveLocation(udg_CL_tarpt)
        -------- Now I turn on the main trigger --------
        Trigger - Turn on CLspelltrig2 <gen>
Main Trigger

Code: Select all

CLspelltrig2
    Events
        Time - Every 0.04 seconds of game time
    Conditions
    Actions
        Custom script:   set bj_wantDestroyGroup = true
        -------- Here I pick all units of the type 'dummy' --------
        Unit Group - Pick every unit in (Units of type Dummy) and do (Actions)
            Loop - Actions
                -------- I check which condition is met. --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                    Then - Actions
                        Set CL_tmppt = (Position of (Picked unit))
                        -------- Here, I go for six dummies serving as the 'beam' --------
                        For each (Integer A) from 1 to 6, do (Actions)
                            Loop - Actions
                                Set CL_tmppt2 = (CL_tmppt offset by (CL_real + 100.00) towards (Facing of (Picked unit)) degrees)
                                Unit - Create 1 Dummy2 for (Owner of (Picked unit)) at CL_tmppt2 facing (Facing of (Picked unit)) degrees
                                Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
                                Unit - Set level of dmg  for (Last created unit) to (Level of Carrier  for (Picked unit))
                                Custom script:   call RemoveLocation(udg_CL_tmppt2)
                                Set CL_real = (CL_real + 100.00)
                        Custom script:   call RemoveLocation(udg_CL_tmppt)
                        Set CL_real = 0.00
                        Set CL_tmppt3 = (Position of (Last created unit))
                        -------- Now it's time to bring in the 'raise dead-dummy' --------
                        Unit - Create 1 Dummy3 for (Owner of (Picked unit)) at CL_tmppt3 facing (Facing of (Picked unit)) degrees
                        -------- This makes the units in the targeted area take damage equal to the level of the spell * 3 --------
                        Unit - Set level of Carrier  for (Last created unit) to (Level of Carrier  for (Picked unit))
                        Set CL_temprect = (Region centered at CL_tmppt3 with size (600.00, 600.00))
                        Custom script:   set bj_wantDestroyGroup = true
                        Unit Group - Pick every unit in (Units in CL_temprect matching (((Matching unit) belongs to an enemy of (Owner of (Last created unit))) Equal to True)) and do (Unit - Cause (Last created unit) to damage (Picked unit), dealing 4000.00 damage of attack type Spells and damage type Normal)
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        -------- Almost done, I do another bunch of dummies making them move outwards (explained above) --------
                        For each (Integer A) from 1 to 10, do (Actions)
                            Loop - Actions
                                Set CL_tmppt2 = (CL_tmppt3 offset by 2000.00 towards (CL_real + 36.00) degrees)
                                Unit - Create 1 Dummy2 for (Owner of (Picked unit)) at CL_tmppt3 facing CL_tmppt2
                                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                                Unit - Order (Last created unit) to Move To CL_tmppt2
                                Unit - Set level of dmg  for (Last created unit) to (Level of Carrier  for (Picked unit))
                                Animation - Change (Last created unit)'s size to (25.00%, 25.00%, 25.00%) of its original size
                                Custom script:   call RemoveLocation(udg_CL_tmppt2)
                                Set CL_real = (CL_real + 36.00)
                        Set CL_real = 0.00
                        Unit - Remove (Picked unit) from the game
                        -------- And last, I create some nice blight combined with a temporary deformation to show the power of the spell --------
                        Environment - Create a 2.00 second Depression ripple deformation at CL_tmppt3 with starting radius 0.00, ending radius 1024.00, and depth 64.00, using 2.00 second ripples spaced 512.00 apart
                        Set CL_tempeff = (Last created special effect)
                        Custom script:   call DestroyEffect(udg_CL_tempeff)
                        Custom script:   call RemoveLocation(udg_CL_tmppt3)
                    Else - Actions
You do not have the required permissions to view the files attached to this post.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Need help help with this spell.

Post by Arabidnun »

Code: Select all

Trigger
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Last Defence!
    Actions
        Trigger - Turn off (This trigger)
        -------- Set up the variables --------
        Set Casting_Unit[(Player number of (Owner of (Attacking unit)))] = (Position of (Attacking unit))
        Set Temp_Point_1[(Player number of (Owner of (Attacking unit)))] = (Position of (Attacked unit))
        Set Angle[(Player number of (Owner of (Attacking unit)))] = (Angle from Casting_Unit[(Player number of (Owner of (Attacking unit)))] to Temp_Point_1[(Player number of (Owner of (Attacking unit)))])
        Set Target_Point[(Player number of (Owner of (Attacking unit)))] = (Casting_Unit[(Player number of (Owner of (Attacking unit)))] offset by 100.00 towards Angle[(Player number of (Owner of (Attacking unit)))] degrees)
        -------- Create the dummy --------
        Unit - Create 1 Dummy for (Owner of (Attacking unit)) at Target_Point[(Player number of (Owner of (Attacking unit)))] facing Temp_Point_1[(Player number of (Owner of (Attacking unit)))]
        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Attacked unit)
        Unit - Make (Last created unit) face Temp_Point_1[(Player number of (Owner of (Attacking unit)))] over 0.00 seconds
        Unit - Set level of Carrier  for (Last created unit) to 1
        -------- Creating a special effect --------
        Special Effect - Create a special effect at Casting_Unit[(Player number of (Owner of (Attacking unit)))] using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
        Set Special_Effect[(Player number of (Owner of (Attacking unit)))] = (Last created special effect)
        Custom script:   call DestroyEffect(udg_Special_Effect[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))])
        Custom script:   call RemoveLocation(udg_Casting_Unit[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))])
        Custom script:   call RemoveLocation(udg_Target_Point[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))])
        -------- Now I turn on the main trigger --------
        Custom script:   set bj_wantDestroyGroup = true
        -------- Here I pick all units of the type 'dummy' --------
        Unit Group - Pick every unit in (Units owned by (Owner of (Attacking unit)) of type Dummy) and do (Actions)
            Loop - Actions
                -------- I check which condition is met. --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                    Then - Actions
                        Set Temp_Point_1[(Player number of (Owner of (Attacking unit)))] = (Position of (Picked unit))
                        -------- Here, I go for six dummies serving as the 'beam' --------
                        For each (Integer A) from 1 to 6, do (Actions)
                            Loop - Actions
                                Set CL_tmppt2[(Player number of (Owner of (Attacking unit)))] = (Temp_Point_1[(Player number of (Owner of (Attacking unit)))] offset by (Angle[(Player number of (Owner of (Attacking unit)))] + 100.00) towards (Facing of (Picked unit)) degrees)
                                Unit - Create 1 Dummy2 for (Owner of (Picked unit)) at CL_tmppt2[(Player number of (Owner of (Attacking unit)))] facing (Facing of (Picked unit)) degrees
                                Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
                                Unit - Set level of dmg  for (Last created unit) to (Level of Carrier  for (Picked unit))
                                Custom script:   call RemoveLocation(udg_CL_tmppt2[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))])
                                Set Angle[(Player number of (Owner of (Attacking unit)))] = (Angle[(Player number of (Owner of (Attacking unit)))] + 100.00)
                        Custom script:   call RemoveLocation(udg_Temp_Point_1[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))])
                        Set Angle[(Player number of (Owner of (Attacking unit)))] = 0.00
                        Set CL_tmppt3[(Player number of (Owner of (Attacking unit)))] = (Position of (Last created unit))
                        -------- Now it's time to bring in the 'raise dead-dummy' --------
                        Unit - Create 1 Dummy3 for (Owner of (Attacking unit)) at CL_tmppt3[(Player number of (Owner of (Attacking unit)))] facing (Facing of (Picked unit)) degrees
                        -------- This makes the units in the targeted area take damage equal to the level of the spell * 3 --------
                        Unit - Set level of Carrier  for (Last created unit) to (Level of Carrier  for (Picked unit))
                        Set Temp_Region[(Player number of (Owner of (Attacking unit)))] = (Region centered at CL_tmppt3[(Player number of (Owner of (Attacking unit)))] with size (600.00, 600.00))
                        Custom script:   set bj_wantDestroyGroup = true
                        Unit Group - Pick every unit in (Units in Temp_Region[(Player number of (Owner of (Attacking unit)))] matching (((Matching unit) belongs to an enemy of (Owner of (Last created unit))) Equal to True)) and do (Unit - Cause (Last created unit) to damage (Picked unit), dealing 4000.00 damage of attack type Spells and damage type Normal)
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        -------- Almost done, I do another bunch of dummies making them move outwards (explained above) --------
                        For each (Integer A) from 1 to 10, do (Actions)
                            Loop - Actions
                                Set CL_tmppt2[(Player number of (Owner of (Attacking unit)))] = (CL_tmppt3[(Player number of (Owner of (Attacking unit)))] offset by 2000.00 towards (Angle[(Player number of (Owner of (Attacking unit)))] + 36.00) degrees)
                                Unit - Create 1 Dummy2 for (Owner of (Picked unit)) at CL_tmppt3[(Player number of (Owner of (Attacking unit)))] facing CL_tmppt2[(Player number of (Owner of (Attacking unit)))]
                                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                                Unit - Order (Last created unit) to Move To CL_tmppt2[(Player number of (Owner of (Attacking unit)))]
                                Unit - Set level of dmg  for (Last created unit) to (Level of Carrier  for (Picked unit))
                                Animation - Change (Last created unit)'s size to (25.00%, 25.00%, 25.00%) of its original size
                                Custom script:   call RemoveLocation(udg_CL_tmppt2[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))])
                                Set Angle[(Player number of (Owner of (Attacking unit)))] = (Angle[(Player number of (Owner of (Attacking unit)))] + 36.00)
                        Set Angle[(Player number of (Owner of (Attacking unit)))] = 0.00
                        Unit - Remove (Picked unit) from the game
                        Trigger - Turn on (This trigger)
                    Else - Actions
Confused Yet?
You do not have the required permissions to view the files attached to this post.