Spellpack Modern Warfare Weaponary

vypur85

Hibernate
Reaction score
803
Modern Warfare Weaponary v3
(Complete)


Hi. It's been a long time since I've submitted a spell. This spellpack originally comes from one of my discontinued map. It's all about modern weapon stuff. These kind of spells are quite common and might have some similarities with some already submitted spells here. But this spellpack is definitely original and the triggers are created by me without any reference.

GUI/JASS: Fully GUI
MUI/MPI: All are at least MPI (or MUI)
Import difficulty: Easy
Leaks: None (A bold statement :p) <-- [del]Damn it! I found a leak. WTF. Will update soon. 15 Oct 08[/del] - 6 Nov 2008


Rifle - MUI
attachment.php

Code:
Map Init for Rifle
    Events
        Map initialization
    Conditions
    Actions
        Set A_Abi_Rifle = (A2) Rifle 
        Set A_UnitType_Bullet_Rifle = Rifle Bullet
        -------- Settings --------
        Set A_Real_Set_Damage = 100.00
        Set A_Real_Set_DamagePerLvl = 50.00
        Set A_Real_Set_AOE = 120.00
        Set A_Int_Set_Distance = 1000

Code:
Rifle
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to A_Abi_Rifle
    Actions
        Trigger - Run Aim System <gen> (checking conditions)
        Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Weapons\RocketMissile\RocketMissile.mdl
        Special Effect - Destroy (Last created special effect)
        Animation - Play (Triggering unit)'s attack animation
        Set A_Pt_Rifle_TriggerPos = (Position of (Triggering unit))
        Set A_Pt_Rifle_TargetPos = (A_Pt_Rifle_TriggerPos offset by 120.00 towards (Facing of (Triggering unit)) degrees)
        Unit - Create 1 A_UnitType_Bullet_Rifle for (Owner of (Triggering unit)) at A_Pt_Rifle_TargetPos facing Y_Real_Aim_GeneralAimAngle degrees
        Unit - Add A_Abi_Rifle to (Last created unit)
        Unit - Set level of A_Abi_Rifle for (Last created unit) to (Level of A_Abi_Rifle for (Triggering unit))
        Unit - Turn collision for (Last created unit) Off
        Unit - Add Storm Crow Form to (Last created unit)
        Animation - Change (Last created unit) flying height to ((Current flying height of (Triggering unit)) + 75.00) at 0.00
        Unit Group - Add (Last created unit) to A_Unitgp_Rifle_Move
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Rifle Bullet Movement <gen> is on) Equal to False
            Then - Actions
                Trigger - Turn on Rifle Bullet Movement <gen>
            Else - Actions
        Custom script:   call RemoveLocation (udg_A_Pt_Rifle_TriggerPos)
        Custom script:   call RemoveLocation (udg_A_Pt_Rifle_TargetPos)

Code:
Rifle Bullet Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in A_Unitgp_Rifle_Move and do (Actions)
            Loop - Actions
                Set A_Pt_Rifle_PickedPos = (Position of (Picked unit))
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Picked unit)) Equal to A_UnitType_Bullet_Rifle
                    Then - Actions
                        Set A_Pt_Rifle_TargetPos = (A_Pt_Rifle_PickedPos offset by ((Real(A_Int_Set_Distance)) / 100.00) towards (Facing of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to A_Pt_Rifle_TargetPos
                        Set A_Unitgp_Rifle_AOE = (Units within A_Real_Set_AOE of A_Pt_Rifle_PickedPos matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Number of units in A_Unitgp_Rifle_AOE) Not equal to 0
                            Then - Actions
                                Set A_Unit_Bullet_PickedUnit = (Random unit from A_Unitgp_Rifle_AOE)
                                Unit - Cause (Picked unit) to damage A_Unit_Bullet_PickedUnit, dealing (A_Real_Set_Damage + (A_Real_Set_DamagePerLvl x ((Real((Level of A_Abi_Rifle for (Picked unit)))) - 1.00))) damage of attack type Spells and damage type Magic
                                Special Effect - Create a special effect attached to the origin of A_Unit_Bullet_PickedUnit using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Custom value of (Picked unit)) Greater than or equal to 100
                            Then - Actions
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                        Custom script:   call DestroyGroup (udg_A_Unitgp_Rifle_AOE)
                        Custom script:   call RemoveLocation (udg_A_Pt_Rifle_TargetPos)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain pathing at A_Pt_Rifle_PickedPos of type Walkability is off) Equal to True
                    Then - Actions
                        Special Effect - Create a special effect at A_Pt_Rifle_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                Destructible - Pick every destructible within A_Real_Set_AOE of A_Pt_Rifle_PickedPos and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked destructible) is alive) Equal to True
                            Then - Actions
                                Special Effect - Create a special effect at A_Pt_Rifle_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - A_Real_Set_Damage)
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                Custom script:   call RemoveLocation (udg_A_Pt_Rifle_PickedPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in A_Unitgp_Rifle_Move) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions


Machine Gun - MUI
attachment.php

Code:
Map Init for Machine Gun
    Events
        Map initialization
    Conditions
    Actions
        Set B_Abi_MachineGun = (A3) Machine Gun 
        Set B_UnitType_Bullet_MachineGun = Machine Gun Bullet
        -------- Settings --------
        Set B_Real_Set_Damage = 60.00
        Set B_Real_Set_DamagePerLvl = 20.00
        Set B_Real_Set_AOE = 120.00
        Set B_Int_Set_Distance = 1000

Code:
Machine Gun
    Events
        Unit - A unit Is issued an order with no target
    Conditions
        (Level of B_Abi_MachineGun for (Triggering unit)) Greater than 0
        Or - Any (Conditions) are true
            Conditions
                (Issued order) Equal to (Order(immolation))
                (Issued order) Equal to (Order(unimmolation))
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Issued order) Equal to (Order(immolation))
            Then - Actions
                Unit Group - Add (Triggering unit) to B_Unitgp_MGun_TurnOn
                Trigger - Turn on Machine Gun Periodic <gen>
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Issued order) Equal to (Order(unimmolation))
                ((Triggering unit) is in B_Unitgp_MGun_TurnOn) Equal to True
            Then - Actions
                Unit Group - Remove (Triggering unit) from B_Unitgp_MGun_TurnOn
            Else - Actions

Code:
Machine Gun Periodic
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in B_Unitgp_MGun_TurnOn and do (Actions)
            Loop - Actions
                -------- ======================================================== --------
                Set Y_Unit_Aim_TriggerUnit = (Picked unit)
                Trigger - Run Aim System <gen> (checking conditions)
                -------- ======================================================== --------
                Set B_Pt_MGun_TriggerPos = (Position of (Picked unit))
                Set B_Pt_MGun_TargetPos = (B_Pt_MGun_TriggerPos offset by 120.00 towards (Facing of (Picked unit)) degrees)
                Special Effect - Create a special effect attached to the weapon,right of (Picked unit) using Abilities\Weapons\RocketMissile\RocketMissile.mdl
                Special Effect - Destroy (Last created special effect)
                Animation - Play (Picked unit)'s attack animation
                Sound - Play AxeMediumChopWood2 <gen> at 100.00% volume, attached to (Picked unit)
                Unit - Create 1 Machine Gun Bullet for (Owner of (Picked unit)) at B_Pt_MGun_TargetPos facing Y_Real_Aim_GeneralAimAngle degrees
                Unit - Add B_Abi_MachineGun to (Last created unit)
                Unit - Set level of B_Abi_MachineGun for (Last created unit) to (Level of B_Abi_MachineGun for (Picked unit))
                Unit - Turn collision for (Last created unit) Off
                Unit - Add Storm Crow Form to (Last created unit)
                Animation - Change (Last created unit) flying height to ((Current flying height of (Picked unit)) + 75.00) at 0.00
                Unit Group - Add (Last created unit) to B_Unitgp_MGun_Move
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is dead) Equal to True
                    Then - Actions
                        Unit Group - Remove (Picked unit) from B_Unitgp_MGun_TurnOn
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Machine Gun Bullet Movement <gen> is on) Equal to False
                    Then - Actions
                        Trigger - Turn on Machine Gun Bullet Movement <gen>
                    Else - Actions
                Custom script:   call RemoveLocation (udg_B_Pt_MGun_TriggerPos)
                Custom script:   call RemoveLocation (udg_B_Pt_MGun_TargetPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in B_Unitgp_MGun_TurnOn) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions

Code:
Machine Gun Bullet Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in B_Unitgp_MGun_Move and do (Actions)
            Loop - Actions
                Set B_Pt_MGun_PickedPos = (Position of (Picked unit))
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Picked unit)) Equal to B_UnitType_Bullet_MachineGun
                    Then - Actions
                        Set B_Pt_MGun_TargetPos = (B_Pt_MGun_PickedPos offset by ((Real(B_Int_Set_Distance)) / 100.00) towards (Facing of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to B_Pt_MGun_TargetPos
                        Set B_Unitgp_MGun_AOE = (Units within B_Real_Set_AOE of B_Pt_MGun_PickedPos matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Number of units in B_Unitgp_MGun_AOE) Not equal to 0
                            Then - Actions
                                Set B_Unit_Bullet_PickedUnit = (Random unit from B_Unitgp_MGun_AOE)
                                Unit - Cause (Picked unit) to damage B_Unit_Bullet_PickedUnit, dealing (B_Real_Set_Damage + (B_Real_Set_DamagePerLvl x ((Real((Level of B_Abi_MachineGun for (Picked unit)))) - 1.00))) damage of attack type Spells and damage type Magic
                                Special Effect - Create a special effect attached to the origin of B_Unit_Bullet_PickedUnit using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Custom value of (Picked unit)) Greater than or equal to 100
                            Then - Actions
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                        Custom script:   call DestroyGroup (udg_B_Unitgp_MGun_AOE)
                        Custom script:   call RemoveLocation (udg_B_Pt_MGun_TargetPos)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain pathing at B_Pt_MGun_PickedPos of type Walkability is off) Equal to True
                    Then - Actions
                        Special Effect - Create a special effect at B_Pt_MGun_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                Destructible - Pick every destructible within B_Real_Set_AOE of B_Pt_MGun_PickedPos and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked destructible) is alive) Equal to True
                            Then - Actions
                                Special Effect - Create a special effect at B_Pt_MGun_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (B_Real_Set_Damage + (B_Real_Set_DamagePerLvl x ((Real((Level of B_Abi_MachineGun for (Picked unit)))) - 1.00))))
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                Custom script:   call RemoveLocation (udg_B_Pt_MGun_PickedPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in B_Unitgp_MGun_Move) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions


Flamethrower - MPI
attachment.php

Code:
Map Init for Flamethrower
    Events
        Map initialization
    Conditions
    Actions
        Set C_Abi_Flamethrower = (B3) Flamethrower 
        Set C_Abi_Flame_Frenzy = (B) Unholy Frenzy (For Flamethrower) 
        Set C_UnitType_Bullet_Flame = Flamethrower Bullet
        -------- Settings --------
        Set C_Real_Set_Damage = 12.00
        Set C_Real_Set_DamagePerLvl = 2.00
        Set C_Real_Set_AOE = 300.00
        Set C_Int_Set_Distance = 600

Code:
Flamethrower
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to C_Abi_Flamethrower
    Actions
        Custom script:   local integer udg_C_Int_Flame_LocalCount
        Set C_Unit_Flame_TriggerUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
        For each (Integer C_Int_Flame_LocalCount) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        C_Int_Set_Distance Greater than 600
                    Then - Actions
                        Set C_Real_Flame_Size = (250.00 + (((Real(C_Int_Set_Distance)) - 600.00) / 4.00))
                    Else - Actions
                        Set C_Real_Flame_Size = 250.00
                Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
                Special Effect - Destroy (Last created special effect)
                Animation - Play (Triggering unit)'s attack animation
                Set C_Pt_Flame_TriggerPos = (Position of (Triggering unit))
                Set C_Pt_Flame_TargetPos = (C_Pt_Flame_TriggerPos offset by 120.00 towards (Facing of (Triggering unit)) degrees)
                Unit - Create 1 C_UnitType_Bullet_Flame for (Owner of (Triggering unit)) at C_Pt_Flame_TargetPos facing (Facing of (Triggering unit)) degrees
                Unit - Add C_Abi_Flamethrower to (Last created unit)
                Unit - Set level of C_Abi_Flamethrower for (Last created unit) to (Level of C_Abi_Flamethrower for (Triggering unit))
                Unit - Turn collision for (Last created unit) Off
                Unit - Add Storm Crow Form to (Last created unit)
                Animation - Change (Last created unit) flying height to ((Current flying height of (Triggering unit)) + 75.00) at 0.00
                Animation - Change (Last created unit)'s size to (C_Real_Flame_Size%, C_Real_Flame_Size%, C_Real_Flame_Size%) of its original size
                Unit Group - Add (Last created unit) to C_Unitgp_Flame_Move
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Flamethrower Bullet Movement <gen> is on) Equal to False
                    Then - Actions
                        Trigger - Turn on Flamethrower Bullet Movement <gen>
                    Else - Actions
                Unit Group - Remove all units from C_Unitgp_Flame_Target[(Player number of (Owner of (Triggering unit)))]
                Custom script:   call RemoveLocation (udg_C_Pt_Flame_TriggerPos)
                Custom script:   call RemoveLocation (udg_C_Pt_Flame_TargetPos)
                Wait 0.10 game-time seconds
        Custom script:   set udg_C_Int_Flame_LocalCount = 0

Code:
Flamethrower Bullet Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in C_Unitgp_Flame_Move and do (Actions)
            Loop - Actions
                Set C_Unit_Flame_PickedUnit = (Picked unit)
                Set C_Pt_Flame_PickedPos = (Position of (Picked unit))
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                Set C_Pt_Flame_TriggerPos = (Position of C_Unit_Flame_TriggerUnit[(Player number of (Owner of (Picked unit)))])
                Set C_Pt_Flame_TargetPos = (C_Pt_Flame_TriggerPos offset by ((((Real(C_Int_Set_Distance)) / 150.00) x (Real((Custom value of (Picked unit))))) + 125.00) towards (Facing of C_Unit_Flame_TriggerUnit[(Player number of (Owner of (Picked unit)))]) degrees)
                Unit - Move (Picked unit) instantly to C_Pt_Flame_TargetPos
                Set C_Unitgp_Flame_AOE = (Units within C_Real_Set_AOE of C_Pt_Flame_PickedPos matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
                Unit Group - Pick every unit in C_Unitgp_Flame_AOE and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) is in C_Unitgp_Flame_Target[(Player number of (Owner of C_Unit_Flame_PickedUnit))]) Equal to False
                            Then - Actions
                                Unit Group - Add (Picked unit) to C_Unitgp_Flame_Target[(Player number of (Owner of C_Unit_Flame_PickedUnit))]
                                Unit - Cause C_Unit_Flame_PickedUnit to damage (Picked unit), dealing (C_Real_Set_Damage + (C_Real_Set_DamagePerLvl x ((Real((Level of C_Abi_Flamethrower for C_Unit_Flame_PickedUnit))) - 1.00))) damage of attack type Spells and damage type Magic
                                Unit - Create 1 Z_UnitType_UniversalDummy for (Owner of C_Unit_Flame_PickedUnit) at C_Pt_Flame_PickedPos facing Default building facing degrees
                                Unit - Add C_Abi_Flame_Frenzy to (Last created unit)
                                Unit - Set level of C_Abi_Flame_Frenzy for (Last created unit) to (Level of C_Abi_Flamethrower for C_Unit_Flame_PickedUnit)
                                Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy (Picked unit)
                                Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                                Unit - Hide (Last created unit)
                            Else - Actions
                Custom script:   call DestroyGroup (udg_C_Unitgp_Flame_AOE)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Custom value of (Picked unit)) Greater than or equal to 150
                    Then - Actions
                        Special Effect - Create a special effect at C_Pt_Flame_PickedPos using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain pathing at C_Pt_Flame_PickedPos of type Walkability is off) Equal to True
                    Then - Actions
                        Special Effect - Create a special effect at C_Pt_Flame_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                Destructible - Pick every destructible within C_Real_Set_AOE of C_Pt_Flame_PickedPos and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked destructible) is alive) Equal to True
                            Then - Actions
                                Special Effect - Create a special effect at C_Pt_Flame_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - ((C_Real_Set_Damage + (C_Real_Set_DamagePerLvl x ((Real((Level of C_Abi_Flamethrower for (Picked unit)))) - 1.00))) x 10.00))
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                Custom script:   call RemoveLocation (udg_C_Pt_Flame_TriggerPos)
                Custom script:   call RemoveLocation (udg_C_Pt_Flame_TargetPos)
                Custom script:   call RemoveLocation (udg_C_Pt_Flame_PickedPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in C_Unitgp_Flame_Move) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions

Shotgun - MUI
attachment.php



Landmine - MUI
Note: You need to combine 2 Landmines. Just make sure you cast 2 Landmines within 1000 range of each other. Once, combined, it's considered activated. Any enemy units who cross the line will trigger the explosion.
attachment.php



Grenade - MUI

attachment.php



Bazooka - MUI
attachment.php



Napalm - MUI
attachment.php



Homing Missile - MUI
attachment.php


The above spells are edited from my original map. Variables are changed here and there, so it took some time to post these. In future, I'll post the remaining spells (Landmine, Shotgun, Heat Seeking Rocket Launcher, Grenades... etc etc...) (Completed)

You may find some of the things in Object Editor to be unrelated to this spellpack. Those are the spells that I have yet to modify yet. (It's hard to modify considering changing variable names and custom scripts). Also, you can see some repetitive triggers in this spellpack. Basically, most of the abilities are triggered the same way.


Hope you find this spellpack useful (aiming more to newbies in WE :)). Credits are not required. Just don't say you make it.

Additional notes:
Also included in this Spellpack is the Aim System. Now, if you want to import some of these spells to your map, you may need to copy the system as well. If you face any problems, please ask. Spells that require the system are:

  1. Rifle
  2. Machine Gun
  3. Shotgun
  4. Bazooka
 

Attachments

  • Marine War (For public) - v1.w3x
    60.2 KB · Views: 586
  • Rifle.jpg
    Rifle.jpg
    81.4 KB · Views: 3,868
  • Machine Gun.jpg
    Machine Gun.jpg
    83.7 KB · Views: 3,202
  • Flamethrower.jpg
    Flamethrower.jpg
    86.8 KB · Views: 3,262
  • Marine War (For public) - v2.w3x
    75.5 KB · Views: 557
  • Marine War (For public) - v3.w3x
    94.7 KB · Views: 594
  • Marine War (For public) - v3.02.w3x
    94.7 KB · Views: 1,064

Vestras

Retired
Reaction score
248
Haven't looked through the codes properly, but you should always, for periodic triggers, use 0.03 - 0.75, never 0.01, causes much lag.
 

vypur85

Hibernate
Reaction score
803
> Why the f*ck would you have a 0.75 sec

Haha... I usually use 0.01, to make it smoother and the fact that 0.01 is easier to calculate.


> these are funny spells

>.<

Machine Gun and Flamethrower are fun to play in the map. Shoot at trees and buildings :).

Tell me if there's bug.
 

Anti-krazy

New Member
Reaction score
5
>> >.<

lol im not saying funny spells as in "this is useless i dont need this" im saying funny spells as "wow these spells are fun to play with i'd like to see how it works

lol...:D
 

Tyman2007

Ya Rly >.
Reaction score
74
5 Definitons of funny gotten from Google Search.
amusing: arousing or provoking laughter; "an amusing film with a steady stream of pranks and pratfalls"; "an amusing fellow"; "a comic hat"; "a ...

curious: beyond or deviating from the usual or expected; "a curious hybrid accent"; "her speech has a funny twang"; "they have some funny ideas about war"; "had an odd name"; "the peculiar aromatic odor of cloves"; "something definitely queer about this town"; "what a rum fellow"; "singular ...

fishy: not as expected; "there was something fishy about the accident"; "up to some funny business"; "some definitely queer goings-on"; "a shady deal"; "her motives were suspect"; "suspicious behavior"

funny story: an account of an amusing incident (usually with a punch line); "she told a funny story"; "she made a funny"

-experiencing odd bodily sensations; "told the doctor about the funny sensations in her chest"

I don't know what u think funny is.. it's funny though how you don't know funny..

Wait..

Back to the point. Good spells! well, They are KINDOF spells.. at the same time weapons, mostly spells though.

I especially like the flamethrower >=)

You should make it if the fire hits the grass there's a chance the grass will light on fire for a certain amount of time, then the grass withers away overtime and finally when the stage hits dirt then the flames disappear..

Ownage..

Just an impossible suggestion thats more of a "You can do this but you cant DO this"
 

Anti-krazy

New Member
Reaction score
5
>> I don't know what u think funny is.. it's funny though how you don't know funny..
there are alot of deffinitions for funny my friend

>> Back to the point.

Good point
 

vypur85

Hibernate
Reaction score
803
Haha... No worries about the funny part. I understood your meaning.

> You can do this but you cant DO this
The grass burning part is almost impossible. But do-able. Don't think I'll do it though :p.
 

vypur85

Hibernate
Reaction score
803
> sniper

This is just something like rifle with faster and longer range of bullet. Hmm... I might try to do one with a laser beam to aim though. Don't hope too much. Now working on shotgun and landmine. :)
 

UndeadDragon

Super Moderator
Reaction score
448
These would be pretty useful for a modern warfare style map. I look forward to seeing what the shotgun and landmine turn out like.
 

vypur85

Hibernate
Reaction score
803
> is it ok if i use flamethrower?

Of course. Else I won't post this spellpack. ALL spells in the spell submission section can be used by anyone at all. Some need credits while some don't.


Myself said:
Credits are not required. Just don't say you make it.
Just don't take it for granted. :)
 

vypur85

Hibernate
Reaction score
803
Updated:
Couldn't add these into first post due to character limit.

Shotgun - MUI
attachment.php

Code:
Map Init for Shotgun
    Events
        Map initialization
    Conditions
    Actions
        -------- Shotgun --------
        Set D_Abi_Shotgun = (D) Shotgun 
        Set D_UnitType_Bullet_Shotgun = Shotgun Bullet
        -------- Settings --------
        Set D_Real_Set_AOE = 120.00
        Set D_Real_Set_Damage = 40.00
        Set D_Real_Set_DamagePerLvl = 10.00
        Set D_Int_Set_Distance = 500
        Set D_Int_Set_CriticalPercent = 3

Code:
Shotgun
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to D_Abi_Shotgun
    Actions
        -------- ======================================================== --------
        Set Y_Unit_Aim_TriggerUnit = (Triggering unit)
        Trigger - Run Aim System <gen> (checking conditions)
        -------- ======================================================== --------
        Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Spells\Other\Volcano\VolcanoMissile.mdl
        Special Effect - Destroy (Last created special effect)
        Set D_Pt_Shotgun_TriggerPos = (Position of (Triggering unit))
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set D_Pt_Shotgun_TargetPos = (D_Pt_Shotgun_TriggerPos offset by (Random real number between 80.00 and 150.00) towards ((Facing of (Triggering unit)) + (Random real number between -20.00 and 20.00)) degrees)
                Unit - Create 1 D_UnitType_Bullet_Shotgun for (Owner of (Triggering unit)) at D_Pt_Shotgun_TargetPos facing (Y_Real_Aim_GeneralAimAngle + (Random real number between -7.50 and 7.50)) degrees
                Unit - Add D_Abi_Shotgun to (Last created unit)
                Unit - Set level of D_Abi_Shotgun for (Last created unit) to (Level of D_Abi_Shotgun for (Triggering unit))
                Unit - Turn collision for (Last created unit) Off
                Unit - Add Storm Crow Form to (Last created unit)
                Animation - Change (Last created unit) flying height to ((Current flying height of (Triggering unit)) + 75.00) at 0.00
                Unit Group - Add (Last created unit) to D_Unitgp_Bullet_Dummy
                Custom script:   call RemoveLocation (udg_D_Pt_Shotgun_TargetPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Shotgun Movement <gen> is on) Equal to False
            Then - Actions
                Trigger - Turn on Shotgun Movement <gen>
            Else - Actions
        Custom script:   call RemoveLocation (udg_D_Pt_Shotgun_TriggerPos)

Code:
Shotgun Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in D_Unitgp_Bullet_Dummy and do (Actions)
            Loop - Actions
                Set D_Pt_Shotgun_PickedPos = (Position of (Picked unit))
                Set D_Pt_Shotgun_TargetPos = (D_Pt_Shotgun_PickedPos offset by ((Real(D_Int_Set_Distance)) / 50.00) towards (Facing of (Picked unit)) degrees)
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                Unit - Move (Picked unit) instantly to D_Pt_Shotgun_TargetPos
                Set D_Unitgp_Bullet_PickedEnemy = (Units within D_Real_Set_AOE of D_Pt_Shotgun_PickedPos matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in D_Unitgp_Bullet_PickedEnemy) Not equal to 0
                    Then - Actions
                        Set D_Unit_Shotgun_Target = (Random unit from D_Unitgp_Bullet_PickedEnemy)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Random integer number between 1 and 100) Less than or equal to D_Int_Set_CriticalPercent
                            Then - Actions
                                Unit - Cause (Picked unit) to damage D_Unit_Shotgun_Target, dealing ((Max life of D_Unit_Shotgun_Target) x 10.00) damage of attack type Spells and damage type Magic
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (D_Unit_Shotgun_Target is dead) Equal to True
                                    Then - Actions
                                        Floating Text - Create floating text that reads |cFFFF0000Critical ... above D_Unit_Shotgun_Target with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                                        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                                        Floating Text - Change (Last created floating text): Disable permanence
                                        Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                                        Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
                                    Else - Actions
                            Else - Actions
                                Unit - Cause (Picked unit) to damage D_Unit_Shotgun_Target, dealing (D_Real_Set_Damage + (D_Real_Set_DamagePerLvl x ((Real((Level of D_Abi_Shotgun for (Picked unit)))) - 1.00))) damage of attack type Spells and damage type Magic
                        Special Effect - Create a special effect attached to the origin of D_Unit_Shotgun_Target using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                        Special Effect - Destroy (Last created special effect)
                        Special Effect - Create a special effect attached to the origin of D_Unit_Shotgun_Target using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Custom value of (Picked unit)) Greater than or equal to 50
                    Then - Actions
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain pathing at D_Pt_Shotgun_PickedPos of type Walkability is off) Equal to True
                    Then - Actions
                        Special Effect - Create a special effect at D_Pt_Shotgun_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                Destructible - Pick every destructible within D_Real_Set_AOE of D_Pt_Shotgun_PickedPos and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked destructible) is alive) Equal to True
                            Then - Actions
                                Special Effect - Create a special effect at D_Pt_Shotgun_PickedPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (D_Real_Set_Damage + (D_Real_Set_DamagePerLvl x ((Real((Level of D_Abi_Shotgun for (Picked unit)))) - 1.00))))
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                Custom script:   call DestroyGroup (udg_D_Unitgp_Bullet_PickedEnemy)
                Custom script:   call RemoveLocation (udg_D_Pt_Shotgun_TargetPos)
                Custom script:   call RemoveLocation (udg_D_Pt_Shotgun_PickedPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in D_Unitgp_Bullet_Dummy) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions

Landmine - MUI
Note: You need to combine 2 Landmines. Just make sure you cast 2 Landmines within 1000 range of each other. Once, combined, it's considered activated. Any enemy units who cross the line will trigger the explosion.
attachment.php

Code:
Map Init for Landmine
    Events
        Map initialization
    Conditions
    Actions
        Set E_UnitType_Bullet_Landmine[1] = Landmine
        Set E_UnitType_Bullet_Landmine[2] = Landmine Dummy 2
        Set E_Abi_Landmine = (E) Landmine 
        Set E_Abi_Landmine_MineExplode = (E) Mine - exploding (For Landmine) 
        -------- Settings --------
        Set E_Int_Set_SpaceBetween = 50
        Set E_Real_Set_AOE = 250.00
        Set E_Real_Set_Damage = 100.00
        Set E_Real_Set_DamagePerLvl = 50.00
        Set E_Real_Set_Range = 1000.00
        Set E_Real_Set_TimedLife = 0.00

Code:
Landmine
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to E_Abi_Landmine
    Actions
        Set E_Pt_Landmine_CastPos = (Target point of ability being cast)
        Set E_Unitgp_Landmine_Mine = (Units within E_Real_Set_Range of E_Pt_Landmine_CastPos matching (((Unit-type of (Matching unit)) Equal to E_UnitType_Bullet_Landmine[1]) and (((Custom value of (Matching unit)) Equal to 0) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in E_Unitgp_Landmine_Mine) Not equal to 0
            Then - Actions
                Set E_Int_Landmine_UnitCount = (E_Int_Landmine_UnitCount + 1)
                Set E_Unit_Landmine_PickedUnit = (Random unit from E_Unitgp_Landmine_Mine)
                Unit - Set the custom value of E_Unit_Landmine_PickedUnit to E_Int_Landmine_UnitCount
                Set E_Pt_Landmine_DummyPos = (Position of E_Unit_Landmine_PickedUnit)
                Unit - Create 1 E_UnitType_Bullet_Landmine[1] for (Owner of (Triggering unit)) at E_Pt_Landmine_CastPos facing Default building facing degrees
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        E_Real_Set_TimedLife Greater than 0.00
                    Then - Actions
                        Unit - Add a E_Real_Set_TimedLife second Generic expiration timer to (Last created unit)
                        Unit - Add a E_Real_Set_TimedLife second Generic expiration timer to E_Unit_Landmine_PickedUnit
                    Else - Actions
                Unit - Turn collision for (Last created unit) Off
                Unit - Set the custom value of (Last created unit) to E_Int_Landmine_UnitCount
                Unit - Add E_Abi_Landmine to (Last created unit)
                Unit - Set level of (E) Landmine  for (Last created unit) to (Level of (E) Landmine  for (Triggering unit))
                Unit - Make E_Unit_Landmine_PickedUnit face E_Pt_Landmine_CastPos over 0.00 seconds
                Set E_Real_Landmine_Distance = ((Distance between E_Pt_Landmine_CastPos and E_Pt_Landmine_DummyPos) / (Real(E_Int_Set_SpaceBetween)))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Integer(E_Real_Landmine_Distance)) Greater than 0
                    Then - Actions
                        For each (Integer A) from 0 to (Integer(E_Real_Landmine_Distance)), do (Actions)
                            Loop - Actions
                                Set E_Pt_Landmine_TargetPos = (E_Pt_Landmine_CastPos offset by (((Distance between E_Pt_Landmine_CastPos and E_Pt_Landmine_DummyPos) / (Real((Integer(E_Real_Landmine_Distance))))) x (Real((Integer A)))) towards (Angle from E_Pt_Landmine_CastPos to E_Pt_Landmine_DummyPos) degrees)
                                Unit - Create 1 E_UnitType_Bullet_Landmine[2] for (Owner of (Triggering unit)) at E_Pt_Landmine_TargetPos facing (Angle from E_Pt_Landmine_CastPos to E_Pt_Landmine_DummyPos) degrees
                                Unit - Set the custom value of (Last created unit) to E_Int_Landmine_UnitCount
                                Unit - Turn collision for (Last created unit) Off
                                Unit - Add Storm Crow Form to (Last created unit)
                                Animation - Change (Last created unit) flying height to 75.00 at 0.00
                                Trigger - Run Landmine Add Ability <gen> (checking conditions)
                                Custom script:   call RemoveLocation (udg_E_Pt_Landmine_TargetPos)
                    Else - Actions
                        Unit - Create 1 E_UnitType_Bullet_Landmine[2] for (Owner of (Triggering unit)) at E_Pt_Landmine_DummyPos facing Default building facing degrees
                        Unit - Set the custom value of (Last created unit) to E_Int_Landmine_UnitCount
                        Unit - Turn collision for (Last created unit) Off
                        Unit - Add Storm Crow Form to (Last created unit)
                        Animation - Change (Last created unit) flying height to 75.00 at 0.00
                        Trigger - Run Landmine Add Ability <gen> (checking conditions)
                        -------- ====================================================== --------
                        Unit - Create 1 E_UnitType_Bullet_Landmine[2] for (Owner of (Triggering unit)) at E_Pt_Landmine_CastPos facing Default building facing degrees
                        Unit - Set the custom value of (Last created unit) to E_Int_Landmine_UnitCount
                        Unit - Turn collision for (Last created unit) Off
                        Unit - Add Storm Crow Form to (Last created unit)
                        Animation - Change (Last created unit) flying height to 75.00 at 0.00
                        Trigger - Run Landmine Add Ability <gen> (checking conditions)
                Special Effect - Create a special effect at E_Pt_Landmine_DummyPos using Abilities\Weapons\Bolt\BoltImpact.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect at E_Pt_Landmine_CastPos using Abilities\Weapons\Bolt\BoltImpact.mdl
                Special Effect - Destroy (Last created special effect)
                Custom script:   call RemoveLocation (udg_E_Pt_Landmine_DummyPos)
            Else - Actions
                Unit - Create 1 E_UnitType_Bullet_Landmine[1] for (Owner of (Triggering unit)) at E_Pt_Landmine_CastPos facing Default building facing degrees
                Unit - Turn collision for (Last created unit) Off
        Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_Mine)
        Custom script:   call RemoveLocation (udg_E_Pt_Landmine_CastPos)

Code:
Landmine Add Ability
    Events
    Conditions
    Actions
        Custom script:   local unit udg_E_Unit_Landmine_DummyLocal
        Set E_Unit_Landmine_DummyLocal = (Last created unit)
        Wait 1.00 game-time seconds
        Unit - Add E_Abi_Landmine_MineExplode to E_Unit_Landmine_DummyLocal
        Custom script:   set udg_E_Unit_Landmine_DummyLocal = null

Code:
Landmine Dies
    Events
        Unit - A unit Dies
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Unit-type of (Triggering unit)) Equal to E_UnitType_Bullet_Landmine[1]
                (Unit-type of (Triggering unit)) Equal to E_UnitType_Bullet_Landmine[2]
    Actions
        -------- To activate the killing of Main Landmine --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Equal to E_UnitType_Bullet_Landmine[2]
            Then - Actions
                Set E_Unitgp_Landmine_Mine = (Units of type E_UnitType_Bullet_Landmine[1])
                Unit Group - Pick every unit in E_Unitgp_Landmine_Mine and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Custom value of (Picked unit)) Equal to (Custom value of (Triggering unit))
                            Then - Actions
                                Set E_Pt_Landmine_DummyPos = (Position of (Picked unit))
                                Unit - Kill (Picked unit)
                                Special Effect - Create a special effect at E_Pt_Landmine_DummyPos using Units\NightElf\Wisp\WispExplode.mdl
                                Special Effect - Destroy (Last created special effect)
                                Custom script:   call RemoveLocation (udg_E_Pt_Landmine_DummyPos)
                            Else - Actions
                Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_Mine)
                Set E_Unitgp_Landmine_Mine = (Units of type E_UnitType_Bullet_Landmine[2])
                Unit Group - Pick every unit in E_Unitgp_Landmine_Mine and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Custom value of (Picked unit)) Equal to (Custom value of (Triggering unit))
                            Then - Actions
                                Set E_Pt_Landmine_DummyPos = (Position of (Picked unit))
                                Unit - Remove (Picked unit) from the game
                                Special Effect - Create a special effect at E_Pt_Landmine_DummyPos using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                                Special Effect - Destroy (Last created special effect)
                                Custom script:   call RemoveLocation (udg_E_Pt_Landmine_DummyPos)
                            Else - Actions
                Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_Mine)
            Else - Actions
        -------- To damage units around when die --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Equal to E_UnitType_Bullet_Landmine[1]
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Killing unit) Equal to No unit
                        (Level of E_Abi_Landmine for (Triggering unit)) Greater than 0
                    Then - Actions
                        Sound - Play ThunderClapCaster <gen> at 100.00% volume, attached to (Triggering unit)
                        Set E_Unitgp_Landmine_Mine = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to E_UnitType_Bullet_Landmine[1]) and (((Matching unit) Not equal to (Triggering unit)) and ((Custom value of (Matching unit)) Equal to (Custom value of (Triggering unit))))))
                        Set E_Unit_Bullet_PickedUnit = (Random unit from E_Unitgp_Landmine_Mine)
                        Set E_Pt_Landmine_TriggerPos = (Position of (Triggering unit))
                        Set E_Pt_Landmine_CastPos = (Position of E_Unit_Bullet_PickedUnit)
                        Set E_Real_Landmine_Distance = ((Distance between E_Pt_Landmine_CastPos and E_Pt_Landmine_TriggerPos) / (Real(E_Int_Set_SpaceBetween)))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Integer(E_Real_Landmine_Distance)) Greater than 0
                            Then - Actions
                                For each (Integer A) from 0 to (Integer(E_Real_Landmine_Distance)), do (Actions)
                                    Loop - Actions
                                        Set E_Pt_Landmine_TargetPos = (E_Pt_Landmine_CastPos offset by (((Distance between E_Pt_Landmine_CastPos and E_Pt_Landmine_TriggerPos) / (Real((Integer(E_Real_Landmine_Distance))))) x (Real((Integer A)))) towards (Angle from E_Pt_Landmine_CastPos to E_Pt_Landmine_DummyPos) degrees)
                                        Set E_Unitgp_Landmine_AOE = (Units within E_Real_Set_AOE of E_Pt_Landmine_TargetPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and (((Matching unit) is alive) Equal to True))))
                                        Unit Group - Pick every unit in E_Unitgp_Landmine_AOE and do (Actions)
                                            Loop - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        ((Picked unit) is in E_Unitgp_Landmine_Store) Equal to False
                                                    Then - Actions
                                                        Unit Group - Add (Picked unit) to E_Unitgp_Landmine_Store
                                                        Unit - Cause (Triggering unit) to damage (Picked unit), dealing (E_Real_Set_Damage + (E_Real_Set_DamagePerLvl x ((Real((Level of E_Abi_Landmine for (Triggering unit)))) - 1.00))) damage of attack type Spells and damage type Magic
                                                    Else - Actions
                                        Destructible - Pick every destructible within E_Real_Set_AOE of E_Pt_Landmine_TargetPos and do (Actions)
                                            Loop - Actions
                                                Destructible - Kill (Picked destructible)
                                        Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_AOE)
                                        Custom script:   call RemoveLocation (udg_E_Pt_Landmine_TargetPos)
                            Else - Actions
                                Set E_Unitgp_Landmine_AOE = (Units within E_Real_Set_AOE of E_Pt_Landmine_TriggerPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and (((Matching unit) is alive) Equal to True))))
                                Unit Group - Pick every unit in E_Unitgp_Landmine_AOE and do (Actions)
                                    Loop - Actions
                                        Unit - Cause (Triggering unit) to damage (Picked unit), dealing (E_Real_Set_Damage + (E_Real_Set_DamagePerLvl x ((Real((Level of E_Abi_Landmine for (Triggering unit)))) - 1.00))) damage of attack type Spells and damage type Magic
                                Destructible - Pick every destructible within E_Real_Set_AOE of E_Pt_Landmine_TriggerPos and do (Actions)
                                    Loop - Actions
                                        Destructible - Kill (Picked destructible)
                                Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_AOE)
                        Unit Group - Remove all units from E_Unitgp_Landmine_Store
                        Unit - Remove (Triggering unit) from the game
                        Unit - Remove E_Unit_Bullet_PickedUnit from the game
                        Custom script:   call RemoveLocation (udg_E_Pt_Landmine_TriggerPos)
                        Custom script:   call RemoveLocation (udg_E_Pt_Landmine_CastPos)
                        Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_Mine)
                    Else - Actions
                Set E_Unitgp_Landmine_Mine = (Units of type E_UnitType_Bullet_Landmine[2])
                Unit Group - Pick every unit in E_Unitgp_Landmine_Mine and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Custom value of (Picked unit)) Equal to (Custom value of (Triggering unit))
                            Then - Actions
                                Set E_Pt_Landmine_DummyPos = (Position of (Picked unit))
                                Special Effect - Create a special effect at E_Pt_Landmine_DummyPos using Abilities\Spells\Other\BlackArrow\BlackArrowMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Unit - Remove (Picked unit) from the game
                                Custom script:   call RemoveLocation (udg_E_Pt_Landmine_DummyPos)
                            Else - Actions
                Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_Mine)
                Set E_Unitgp_Landmine_Mine = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to E_UnitType_Bullet_Landmine[1]) and (((Matching unit) Not equal to (Triggering unit)) and ((Custom value of (Matching unit)) Equal to (Custom value of (Triggering unit))))))
                Unit Group - Pick every unit in E_Unitgp_Landmine_Mine and do (Actions)
                    Loop - Actions
                        Set E_Pt_Landmine_DummyPos = (Position of (Picked unit))
                        Special Effect - Create a special effect at E_Pt_Landmine_DummyPos using Abilities\Spells\Other\BlackArrow\BlackArrowMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                        Custom script:   call RemoveLocation (udg_E_Pt_Landmine_DummyPos)
                Custom script:   call DestroyGroup (udg_E_Unitgp_Landmine_Mine)
            Else - Actions


Map Download
 

Attachments

  • Landmine.jpg
    Landmine.jpg
    94.2 KB · Views: 3,023
  • Shotgun.jpg
    Shotgun.jpg
    83.2 KB · Views: 3,041
  • Bazooka.jpg
    Bazooka.jpg
    187.3 KB · Views: 2,977
  • Grenade.jpg
    Grenade.jpg
    183.5 KB · Views: 3,012
  • Napalm.jpg
    Napalm.jpg
    198.2 KB · Views: 2,962
  • Homing Missile.jpg
    Homing Missile.jpg
    77.1 KB · Views: 2,929

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Awesome shotgun. Can't believe you're still stuck with using GUI though (patience is virtue I guess).
 

vypur85

Hibernate
Reaction score
803
> still stuck with using GUI

Lol... Yeah. Still remembered the first time we met was you asking help in making Toss (I think that was you, if I remembered correctly). Now, you know JASS and I'm still here... Haha... Anyway, I am actually learning. But somehow or the other, I just can't pick it up. Not sure why =.=". Probably I just don't have the programming mind :p. Shotgun is yet another rip off from Rifle. The only differences are the critical shot and pellet number.
 

vypur85

Hibernate
Reaction score
803
Another update.

Yeah, I realise that this submission is becoming too big. Want me to provide a separate thread? Please tell.

Grenade - MUI

attachment.php

Code:
Map Init for Grenade
    Events
        Map initialization
    Conditions
    Actions
        Set F_Abi_Grenade = (F) Grenade 
        Set F_UnitType_Bullet_Grenade = Grenade Bullet
        -------- Settings --------
        Set F_Real_Set_AOE = 350.00
        Set F_Real_Set_Damage = 200.00
        Set F_Real_Set_DamagePerLevel = 75.00
        Set F_Real_Set_Height = 500.00

Code:
Grenade
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to F_Abi_Grenade
    Actions
        Set F_Pt_Grenade_TriggerPos = (Position of (Triggering unit))
        Set F_Pt_Grenade_TargetPos = (Target point of ability being cast)
        Unit - Create 1 F_UnitType_Bullet_Grenade for (Owner of (Triggering unit)) at F_Pt_Grenade_TriggerPos facing (Angle from F_Pt_Grenade_TriggerPos to F_Pt_Grenade_TargetPos) degrees
        Unit - Add F_Abi_Grenade to (Last created unit)
        Unit - Set level of F_Abi_Grenade for (Last created unit) to (Level of F_Abi_Grenade for (Triggering unit))
        Unit - Set life of (Last created unit) to ((Distance between F_Pt_Grenade_TriggerPos and F_Pt_Grenade_TargetPos) / 120.00)
        Unit - Turn collision for (Last created unit) Off
        Unit Group - Add (Last created unit) to F_Unitgp_Grenade_Move
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Grenade Movement <gen> is on) Equal to False
            Then - Actions
                Trigger - Turn on Grenade Movement <gen>
            Else - Actions
        Custom script:   call RemoveLocation (udg_F_Pt_Grenade_TriggerPos)
        Custom script:   call RemoveLocation (udg_F_Pt_Grenade_TargetPos)

Code:
Grenade Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in F_Unitgp_Grenade_Move and do (Actions)
            Loop - Actions
                Set F_Unit_Grenade_PickedUnit = (Picked unit)
                Set F_Pt_Grenade_PickedPos = (Position of (Picked unit))
                Set F_Pt_Grenade_TargetPos = (F_Pt_Grenade_PickedPos offset by (Life of (Picked unit)) towards (Facing of (Picked unit)) degrees)
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                Unit - Move (Picked unit) instantly to F_Pt_Grenade_TargetPos
                Set F_Real_Grenade_FlyHeight = ((Power(60.00, 2.00)) - (Power(((Real((Custom value of (Picked unit)))) - 60.00), 2.00)))
                Animation - Change (Picked unit) flying height to (F_Real_Grenade_FlyHeight / (3600.00 / F_Real_Set_Height)) at 0.00
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Custom value of (Picked unit)) Greater than or equal to 120
                    Then - Actions
                        Set F_Unitgp_Grenade_AOE = (Units within 350.00 of F_Pt_Grenade_PickedPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and (((Matching unit) is alive) Equal to True))))
                        Unit Group - Pick every unit in F_Unitgp_Grenade_AOE and do (Actions)
                            Loop - Actions
                                Unit - Cause F_Unit_Grenade_PickedUnit to damage (Picked unit), dealing ((Real((Point-value of (Unit-type of F_Unit_Grenade_PickedUnit)))) x 1.00) damage of attack type Spells and damage type Magic
                        Special Effect - Create a special effect at F_Pt_Grenade_PickedPos using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
                        Special Effect - Destroy (Last created special effect)
                        Special Effect - Create a special effect at F_Pt_Grenade_PickedPos using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCasterOverhead.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                        Custom script:   call DestroyGroup (udg_F_Unitgp_Grenade_AOE)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain pathing at F_Pt_Grenade_PickedPos of type Walkability is off) Equal to True
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Facing of (Picked unit)) Greater than or equal to 0.00
                                (Facing of (Picked unit)) Less than 180.00
                            Then - Actions
                                Unit - Make (Picked unit) face ((Facing of (Picked unit)) + 10.00) over 0.00 seconds
                            Else - Actions
                                Unit - Make (Picked unit) face ((Facing of (Picked unit)) - 10.00) over 0.00 seconds
                    Else - Actions
                Custom script:   call RemoveLocation (udg_F_Pt_Grenade_TargetPos)
                Custom script:   call RemoveLocation (udg_F_Pt_Grenade_PickedPos)


Bazooka - MUI
attachment.php

Code:
Map Init for Bazooka
    Events
        Map initialization
    Conditions
    Actions
        Set G_Abi_Bazooka = (G) Bazooka 
        Set G_UnitType_Bullet_Bazooka = Bazooka Bullet
        -------- Settings --------
        Set G_Real_Set_Damage = 250.00
        Set G_Real_Set_DamagePerLevel = 75.00
        Set G_Real_Set_AOE = 120.00
        Set G_Real_Set_AOEDmg = 300.00
        Set G_Int_Set_Distance = 1500
        Set G_Int_Set_SmoothingFactor = 250

Code:
Bazooka
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to G_Abi_Bazooka
    Actions
        -------- ======================================================== --------
        Set Y_Unit_Aim_TriggerUnit = (Triggering unit)
        Trigger - Run Aim System <gen> (checking conditions)
        -------- ======================================================== --------
        Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Spells\Other\TinkerRocket\TinkerRocketMissile.mdl
        Special Effect - Destroy (Last created special effect)
        Set G_Pt_Bazooka_TriggerPos = (Position of (Triggering unit))
        Set G_Pt_Bazooka_TargetPos = (G_Pt_Bazooka_TriggerPos offset by 120.00 towards (Facing of (Triggering unit)) degrees)
        Unit - Create 1 G_UnitType_Bullet_Bazooka for (Owner of (Triggering unit)) at G_Pt_Bazooka_TargetPos facing Y_Real_Aim_GeneralAimAngle degrees
        Unit - Add G_Abi_Bazooka to (Last created unit)
        Unit - Set level of G_Abi_Bazooka for (Last created unit) to (Level of G_Abi_Bazooka for (Triggering unit))
        Unit - Add Storm Crow Form to (Last created unit)
        Unit - Turn collision for (Last created unit) Off
        Animation - Change (Last created unit) flying height to ((Current flying height of (Triggering unit)) + 75.00) at 0.00
        Unit Group - Add (Last created unit) to G_Unitgp_Bazooka_Move
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Bazooka Bullet Movement <gen> is on) Equal to False
            Then - Actions
                Trigger - Turn on Bazooka Bullet Movement <gen>
            Else - Actions
        Custom script:   call RemoveLocation (udg_G_Pt_Bazooka_TriggerPos)
        Custom script:   call RemoveLocation (udg_G_Pt_Bazooka_TargetPos)
        -------- ======================================================== --------
        Set G_Real_Bazooka_Progression = (((2.00 x (Real(G_Int_Set_Distance))) / (Real(G_Int_Set_SmoothingFactor))) / ((Real(G_Int_Set_SmoothingFactor)) - 1.00))
        -------- ======================================================== --------

Code:
Bazooka Bullet Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in G_Unitgp_Bazooka_Move and do (Actions)
            Loop - Actions
                Set G_Unit_Bazooka_PickedUnit = (Picked unit)
                Set G_Pt_Bazooka_DummyPos = (Position of (Picked unit))
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                Set G_Pt_Bazooka_TargetPos = (G_Pt_Bazooka_DummyPos offset by (((Real((Custom value of (Picked unit)))) - 1.00) x G_Real_Bazooka_Progression) towards (Facing of (Picked unit)) degrees)
                Unit - Move (Picked unit) instantly to G_Pt_Bazooka_TargetPos
                Set G_Unitgp_Bazooka_AOE = (Units within G_Real_Set_AOE of G_Pt_Bazooka_DummyPos matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in G_Unitgp_Bazooka_AOE) Not equal to 0
                    Then - Actions
                        Set G_Unitgp_Bazooka_DmgAOE = (Units within G_Real_Set_AOEDmg of G_Pt_Bazooka_DummyPos matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
                        Unit Group - Pick every unit in G_Unitgp_Bazooka_DmgAOE and do (Actions)
                            Loop - Actions
                                Unit - Cause G_Unit_Bazooka_PickedUnit to damage (Picked unit), dealing (G_Real_Set_Damage + (G_Real_Set_DamagePerLevel x ((Real((Level of G_Abi_Bazooka for G_Unit_Bazooka_PickedUnit))) - 1.00))) damage of attack type Spells and damage type Magic
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                        Destructible - Pick every destructible within G_Real_Set_AOEDmg of G_Pt_Bazooka_DummyPos and do (Actions)
                            Loop - Actions
                                Special Effect - Create a special effect at G_Pt_Bazooka_DummyPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (G_Real_Set_Damage + (G_Real_Set_DamagePerLevel x ((Real((Level of G_Abi_Bazooka for (Picked unit)))) - 1.00))))
                        Unit - Remove (Picked unit) from the game
                        Special Effect - Create a special effect at G_Pt_Bazooka_DummyPos using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call DestroyGroup (udg_G_Unitgp_Bazooka_DmgAOE)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Custom value of (Picked unit)) Greater than or equal to G_Int_Set_SmoothingFactor
                    Then - Actions
                        Set G_Unitgp_Bazooka_DmgAOE = (Units within G_Real_Set_AOEDmg of G_Pt_Bazooka_DummyPos matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Number of units in G_Unitgp_Bazooka_DmgAOE) Greater than 0
                            Then - Actions
                                Unit Group - Pick every unit in G_Unitgp_Bazooka_DmgAOE and do (Actions)
                                    Loop - Actions
                                        Unit - Cause G_Unit_Bazooka_PickedUnit to damage (Picked unit), dealing (G_Real_Set_Damage + (G_Real_Set_DamagePerLevel x ((Real((Level of G_Abi_Bazooka for G_Unit_Bazooka_PickedUnit))) - 1.00))) damage of attack type Spells and damage type Magic
                                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                        Special Effect - Destroy (Last created special effect)
                                Destructible - Pick every destructible within G_Real_Set_AOEDmg of G_Pt_Bazooka_DummyPos and do (Actions)
                                    Loop - Actions
                                        Special Effect - Create a special effect at G_Pt_Bazooka_DummyPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (G_Real_Set_Damage + (G_Real_Set_DamagePerLevel x ((Real((Level of G_Abi_Bazooka for (Picked unit)))) - 1.00))))
                            Else - Actions
                        Unit - Remove (Picked unit) from the game
                        Special Effect - Create a special effect at G_Pt_Bazooka_DummyPos using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call DestroyGroup (udg_G_Unitgp_Bazooka_DmgAOE)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain pathing at G_Pt_Bazooka_DummyPos of type Walkability is off) Equal to True
                    Then - Actions
                        Special Effect - Create a special effect at G_Pt_Bazooka_DummyPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Remove (Picked unit) from the game
                    Else - Actions
                Destructible - Pick every destructible within G_Real_Set_AOE of G_Pt_Bazooka_DummyPos and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked destructible) is alive) Equal to True
                            Then - Actions
                                Special Effect - Create a special effect at G_Pt_Bazooka_DummyPos using Abilities\Weapons\CannonTowerMissile\CannonTowerMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (G_Real_Set_Damage + (G_Real_Set_DamagePerLevel x ((Real((Level of G_Abi_Bazooka for (Picked unit)))) - 1.00))))
                                Unit - Remove (Picked unit) from the game
                            Else - Actions
                Custom script:   call DestroyGroup (udg_G_Unitgp_Bazooka_AOE)
                Custom script:   call RemoveLocation (udg_G_Pt_Bazooka_TargetPos)
                Custom script:   call RemoveLocation (udg_G_Pt_Bazooka_DummyPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in G_Unitgp_Bazooka_Move) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions


Napalm - MUI
attachment.php

Code:
Map Init for Napalm
    Events
        Map initialization
    Conditions
    Actions
        -------- Napalm --------
        Set H_Abi_Napalm = (H) Napalm 
        Set H_UnitType_Bullet_Napalm = Napalm Dummy
        -------- Settings --------
        Set H_Real_Set_Damage = 150.00
        Set H_Real_Set_DamagePerLvl = 75.00
        Set H_Real_Set_InitialAOE = 200.00
        Set H_Real_Set_FinalAOE = 400.00
        Set H_Int_Set_PelletNum = 4
        Set H_Real_Set_SectorAngle = 40.00

Code:
Napalm
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to H_Abi_Napalm
    Actions
        Set H_Pt_Napalm_TriggerPos = (Position of (Triggering unit))
        For each (Integer B) from 1 to 2, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Integer B) Equal to 1
                    Then - Actions
                        For each (Integer A) from 1 to H_Int_Set_PelletNum, do (Actions)
                            Loop - Actions
                                Unit - Create 1 H_UnitType_Bullet_Napalm for (Owner of (Triggering unit)) at H_Pt_Napalm_TriggerPos facing ((Facing of (Triggering unit)) + (H_Real_Set_SectorAngle / 2.00)) degrees
                                Unit - Add H_Abi_Napalm to (Last created unit)
                                Unit - Set level of H_Abi_Napalm for (Last created unit) to (Level of H_Abi_Napalm for (Triggering unit))
                                Unit - Add Storm Crow Form to (Last created unit)
                                Animation - Change (Last created unit) flying height to 150.00 at 0.00
                                Unit - Turn collision for (Last created unit) Off
                                Unit - Set life of (Last created unit) to (1.25 x (Real((Integer A))))
                                Unit Group - Add (Last created unit) to H_Unitgp_Napalm_Move
                    Else - Actions
                        For each (Integer A) from 1 to H_Int_Set_PelletNum, do (Actions)
                            Loop - Actions
                                Unit - Create 1 H_UnitType_Bullet_Napalm for (Owner of (Triggering unit)) at H_Pt_Napalm_TriggerPos facing ((Facing of (Triggering unit)) - (H_Real_Set_SectorAngle / 2.00)) degrees
                                Unit - Add H_Abi_Napalm to (Last created unit)
                                Unit - Set level of H_Abi_Napalm for (Last created unit) to (Level of H_Abi_Napalm for (Triggering unit))
                                Unit - Add Storm Crow Form to (Last created unit)
                                Animation - Change (Last created unit) flying height to 150.00 at 0.00
                                Unit - Turn collision for (Last created unit) Off
                                Unit - Set life of (Last created unit) to (1.25 x (Real((Integer A))))
                                Unit Group - Add (Last created unit) to H_Unitgp_Napalm_Move
        Custom script:   call RemoveLocation (udg_H_Pt_Napalm_TriggerPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Napalm Bullet Movement <gen> is on) Equal to False
            Then - Actions
                Trigger - Turn on Napalm Bullet Movement <gen>
            Else - Actions

Code:
Napalm Bullet Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in H_Unitgp_Napalm_Move and do (Actions)
            Loop - Actions
                Set H_Unit_Bullet_PickedUnit = (Picked unit)
                Set H_Pt_Napalm_DummyPos = (Position of (Picked unit))
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                For each (Integer A) from 1 to H_Int_Set_PelletNum, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Life of (Picked unit)) Equal to (1.25 x (Real((Integer A))))
                            Then - Actions
                                Set H_Pt_Napalm_TargetPos = (H_Pt_Napalm_DummyPos offset by (Life of (Picked unit)) towards (Facing of (Picked unit)) degrees)
                                Unit - Move (Picked unit) instantly to H_Pt_Napalm_TargetPos
                                Set H_Real_Bullet_FlyHeight = ((Power(((75.00 + (Real((((Integer A) - 1) x 40)))) / 2.00), 2.00)) - (Power(((Real((Custom value of (Picked unit)))) - ((75.00 + (Real((((Integer A) - 1) x 40)))) / 2.00)), 2.00)))
                                Animation - Change (Picked unit) flying height to (H_Real_Bullet_FlyHeight / 20.00) at 0.00
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Custom value of (Picked unit)) Greater than or equal to (75 + (((Integer A) - 1) x 40))
                                    Then - Actions
                                        Set H_Unitgp_Napalm_AOEDmg = (Units within (H_Real_Set_InitialAOE + (((H_Real_Set_FinalAOE - H_Real_Set_InitialAOE) / ((Real(H_Int_Set_PelletNum)) - 1.00)) x ((Real((Integer A))) - 1.00))) of H_Pt_Napalm_DummyPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matchin
                                        Unit Group - Pick every unit in H_Unitgp_Napalm_AOEDmg and do (Actions)
                                            Loop - Actions
                                                Unit - Cause H_Unit_Bullet_PickedUnit to damage (Picked unit), dealing (H_Real_Set_Damage + (H_Real_Set_DamagePerLvl x ((Real((Level of H_Abi_Napalm for H_Unit_Bullet_PickedUnit))) - 1.00))) damage of attack type Spells and damage type Magic
                                        Destructible - Pick every destructible within (H_Real_Set_InitialAOE + (((H_Real_Set_FinalAOE - H_Real_Set_InitialAOE) / ((Real(H_Int_Set_PelletNum)) - 1.00)) x ((Real((Integer A))) - 1.00))) of H_Pt_Napalm_DummyPos and do (Actions)
                                            Loop - Actions
                                                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (H_Real_Set_Damage + (H_Real_Set_DamagePerLvl x ((Real((Level of H_Abi_Napalm for (Picked unit)))) - 1.00))))
                                        Special Effect - Create a special effect at H_Pt_Napalm_DummyPos using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Unit - Remove (Picked unit) from the game
                                        Custom script:   call DestroyGroup (udg_H_Unitgp_Napalm_AOEDmg)
                                    Else - Actions
                                Custom script:   call RemoveLocation (udg_H_Pt_Napalm_TargetPos)
                            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain pathing at H_Pt_Napalm_DummyPos of type Walkability is off) Equal to True
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Facing of (Picked unit)) Greater than or equal to 0.00
                                (Facing of (Picked unit)) Less than 180.00
                            Then - Actions
                                Unit - Make (Picked unit) face ((Facing of (Picked unit)) + 10.00) over 0.00 seconds
                            Else - Actions
                                Unit - Make (Picked unit) face ((Facing of (Picked unit)) - 10.00) over 0.00 seconds
                    Else - Actions
                Custom script:   call RemoveLocation (udg_H_Pt_Napalm_DummyPos)


Homing Missile - MUI
attachment.php

Code:
Map Init for Homing Missile
    Events
        Map initialization
    Conditions
    Actions
        Set I_Abi_HomingMissile = (I) Homing Missile 
        Set I_Abi_HomingMissile_AcidBomb = (I) Homing Missile Dummy 
        Set I_UnitType_Bullet_HomingMissil = Homing Missile Dummy
        -------- Settings --------
        Set I_Real_Set_Damage = 400.00
        Set I_Real_Set_DamagePerLvl = 100.00
        Set I_Real_Set_AOEDmg = 100.00
        Set I_Real_Set_AOEDmgPerLvl = 20.00
        Set I_Real_Set_AOE = 350.00

Code:
Homing Missile
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to (I) Homing Missile 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Target unit of ability being cast) is in I_Unitgp_HomingMissile_Target) Equal to False
            Then - Actions
                Trigger - Add to Homing Missile Damage Taken <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
                Unit Group - Add (Target unit of ability being cast) to I_Unitgp_HomingMissile_Target
            Else - Actions
        Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
        Special Effect - Destroy (Last created special effect)
        Set I_Pt_HomingMissile_TriggerPos = (Position of (Triggering unit))
        Unit - Create 1 I_UnitType_Bullet_HomingMissil for (Owner of (Triggering unit)) at I_Pt_HomingMissile_TriggerPos facing (Facing of (Triggering unit)) degrees
        Unit - Add I_Abi_HomingMissile_AcidBomb to (Last created unit)
        Unit - Set level of I_Abi_HomingMissile_AcidBomb for (Last created unit) to (Level of I_Abi_HomingMissile for (Triggering unit))
        Unit - Add Storm Crow Form to (Last created unit)
        Animation - Change (Last created unit) flying height to (Current flying height of (Triggering unit)) at 0.00
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Target unit of ability being cast)
        Unit - Hide (Last created unit)
        Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation (udg_I_Pt_HomingMissile_TriggerPos)

Code:
Homing Missile Damage Taken
    Events
    Conditions
        (Unit-type of (Damage source)) Equal to I_UnitType_Bullet_HomingMissil
        (Damage taken) Greater than 0.00
    Actions
        Trigger - Turn off (This trigger)
        Set I_Pt_HomingMissile_TriggerPos = (Position of (Triggering unit))
        Unit - Remove Acid Bomb buff from (Triggering unit)
        Unit - Cause (Damage source) to damage (Triggering unit), dealing (I_Real_Set_Damage + (I_Real_Set_DamagePerLvl x ((Real((Level of I_Abi_HomingMissile for (Damage source)))) - 1.00))) damage of attack type Spells and damage type Magic
        Set I_Unitgp_HomingMissile_AOE = (Units within I_Real_Set_AOE of I_Pt_HomingMissile_TriggerPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Damage source))) Equal to True) and (((Matching unit) Not equal to (Triggering u
        Unit Group - Pick every unit in I_Unitgp_HomingMissile_AOE and do (Actions)
            Loop - Actions
                Unit - Cause (Damage source) to damage (Picked unit), dealing (I_Real_Set_AOEDmg + (I_Real_Set_AOEDmgPerLvl x ((Real((Level of I_Abi_HomingMissile for (Damage source)))) - 1.00))) damage of attack type Spells and damage type Magic
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\TinkerRocket\TinkerRocketMissile.mdl
                Special Effect - Destroy (Last created special effect)
        Destructible - Pick every destructible within I_Real_Set_AOE of I_Pt_HomingMissile_TriggerPos and do (Actions)
            Loop - Actions
                Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - (I_Real_Set_AOEDmg + (I_Real_Set_AOEDmgPerLvl x ((Real((Level of I_Abi_HomingMissile for (Damage source)))) - 1.00))))
        Unit - Remove (Damage source) from the game
        Custom script:   call DestroyGroup (udg_I_Unitgp_HomingMissile_AOE)
        Custom script:   call RemoveLocation (udg_I_Pt_HomingMissile_TriggerPos)
        Trigger - Turn on (This trigger)


Download Link
 

Kazuga

Let the game begin...
Reaction score
110
Are you sure you want to use every 0.01? It creates a greater chance for lag. 0.03 is the recommended but I always go with 0.05, no difference noticed in the smoothness. Also there is already a Bazooka/Rocket launcher in the spell section, though this does not explode on terrain. Good job though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top