vypur85
Hibernate
- Reaction score
- 804
Modern Warfare Weaponary v3
(Complete)
(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
Rifle - MUI
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
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
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
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.
Grenade - MUI
Bazooka - MUI
Napalm - MUI
Homing Missile - MUI
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
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:
- Rifle
- Machine Gun
- Shotgun
- Bazooka
Attachments
-
60.2 KB Views: 558
-
81.4 KB Views: 3,848
-
83.7 KB Views: 3,182
-
86.8 KB Views: 3,243
-
75.5 KB Views: 530
-
94.7 KB Views: 563
-
94.7 KB Views: 1,032