Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
This system allows you to create spell in a simpler way with these feathers:
o Simply create a straight projectile
o Create a projectile with vertical arc (normal missile) or horizontal arc (like
DotA's Wild Axe of Rexxar)
o Create a projectile toward a unit or location
o Can activate following trigger when hit (allow you to create attaching effect
(like stun, knock back,...).
II. Installation
**This system require UMSWE**
1. Import missiledummy.mdx with contained in this map to your map
2. Create a new dummy which uses the model above and have Harvest ability.
3. Copy triggers: CPS Loop, CPS Creating, CPS Init to your map.
4. In trigger CPS Init, Set CPS_Dummy = "Your missile dummy"
III. Variables' Functions
Projectile_AttackType: attack type of damage
Projectile_Damage: impact damage (real)
Projectile_DamageType: type of impact damage
Projectile_Impact: effect will be created at the impact
Projectile_Model: model of projectile
Projectile_Height: flying height of projectile
Projectile_Size: size (%) of projectile, this value decides both Length, Width, Height.
Projectile_Speed: flying range of projectile every 0.02 second
Projectile_Source: source unit of projectile
Projectile_TargetUnit: target unit of projectile
Projectile_TargetPoint: target point of projectile
Projectile_UnitOrPoint: this value decides target type of projectile
+ True: target type of projectile is unit.
+ False: target type of projectile is point. When it is false, you need to set the
following variable:
<> Projectile_AoE - decide projectile's area of effect.
<> Projectile_DestroyTree - allow to destroy trees or not (true/false)
Projectile_Trigger: trigger will be activated at the projectile's impact
Projectile_HArc: true = projectile will move with horizontal arc, false = without arc.
Once this value is true, there are variables you need to set:
<> Projectile_HArcWidth: decide arc's width, it also depends on projectile's speed
<> Projectile_HArcLeftOrRight: true = left, false = right
Projectile_VArc: true = projectile will move with vertical arc, false = without arc.
Once this value is true, there is a variable you need to set:
<> Projectile_VArcHeight: decide arc's height, it also depend on projectile's speed
IV. How to Use
1. You need 1 trigger to set all (or what neccesary) variables above, then run
CPS Creating by using:
2. To use a following trigger:
a) You can use directly stored Projectile System's data through those variables:
SPSD_Caster
SPSD_TargetUnit
SPSD_TargetPoint (it's unnecessary to remove leak this variable, because the
system will automatically do it)
b) In my onpinion, you should set those variables above into yours own because those
data will be removed/replaced in about a trigger loop.
Set ABC_Caster = SPSD_Caster
Set ABC_Target = SPSD_TargetUnit
Set ABC_Point = SPSD_TargetPoint
(ABC is your spell's name)
3. See "Example Spells" - "Frost Arrow / Immolation Arrow Spell" if you need some
example about how to use following trigger.
V. Credit
@ redscores for the dummy model. @ Magtheridon96, Almia for useful tips @ GhostHunter123
CPS Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Set CPS_Off = True
Do Multiple ActionsFor each (Integer CPS_Loop) from 1 to CPS_MUI, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CPS_Missile[CPS_Loop] Not equal to (!=) No unit
Then - Actions
Set CPS_Point[9] = (Position of CPS_Missile[CPS_Loop])
Set CPS_Point[10] = (Position of CPS_TargetUnit[CPS_Loop])
Set CPS_Point[11] = (CPS_SourcePoint[CPS_Loop] offset by CPS_TraveledDistance[CPS_Loop] towards (Angle from CPS_SourcePoint[CPS_Loop] to CPS_Point[10]) degrees)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between CPS_Point[10] and CPS_Point[11]) Greater than or equal to (>=) (CPS_Speed[CPS_Loop] + 10.00)
Set CPS_Point[12] = (Position of CPS_TargetUnit[CPS_Loop])
Special Effect - Create a special effect at CPS_Point[12] using CPS_Impact[CPS_Loop]
Special Effect - Destroy (Last created special effect)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CPS_UnitOrPoint[CPS_Loop] Equal to (==) True
Then - Actions
Unit - Cause CPS_Source[CPS_Loop] to damage CPS_TargetUnit[CPS_Loop], dealing CPS_Damage[CPS_Loop] damage of attack type CPS_AttackType[CPS_Loop] and damage type CPS_DamageType[CPS_Loop]
Unit Group - Pick every unit in (Units within CPS_AoE[CPS_Loop] of CPS_Point[12]) and do (Actions)
Loop - Actions
Set CPS_Target = (Picked unit)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(CPS_Target is A structure) Equal to (==) False
(CPS_Target is Mechanical) Equal to (==) False
(CPS_Target is alive) Equal to (==) True
(CPS_Target belongs to an enemy of (Owner of CPS_Source[CPS_Loop])) Equal to (==) True
Then - Actions
Unit - Cause CPS_Source[CPS_Loop] to damage CPS_Target, dealing CPS_Damage[CPS_Loop] damage of attack type CPS_AttackType[CPS_Loop] and damage type CPS_DamageType[CPS_Loop]
Else - Actions
Unit - Remove CPS_TargetUnit[CPS_Loop] from the game
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CPS_Dummy Equal to (==) No unit
Then - Actions
Set TempPoint = (Center of (Playable map area))
Unit - Create 1 CPS_DummyType for Neutral Passive at TempPoint facing Default building facing (270.0) degrees
Unit - Add Harvest (Neutral) to (Last created unit)
Set CPS_Dummy = (Last created unit)
Custom script: call RemoveLocation(udg_TempPoint)
Else - Actions
Ver 1.2c
- Improved code.
Ver 1.2b
- Used 1 global dummy instead of creating dummy on checking tree
- Reduced default projectile's height to 50.00
Notice for those using version 1.2: before updating to version 1.2b, you
should remove the old system, change "CPS_Dummy" into unit type and then
copy the new system in order to avoid variable type error.
Ver 1.2
- Add new arc effect - Vertical Arc (like DotA's Wild Axe of Rexxar)
- Added 3 new example spells
- Added some descriptions to understand code easier.
- Fixed bug that destroy bridge
- Fixed bug that straight projectiles played random animation while moving.
- Reposition action:
- System will reset almost data into default. A default projectile will have:
AoE = 0.00
AttackType = Magic
Damage = 0.00
DamageType = Normal
DestroyTree = False
HArc = False
Height = 100.00 (from version 1.2b, this value is 50)
Impact = none
Model = none
Size = 100.00
Source = No unit
Speed = 25.00
TargetUnit = No unit
Trigger = No trigger
UnitOrPoint = True
VArc = False
When you want to create a default projectile, you only need to set caster,
target, model, impact,... then run CPS_Creating trigger. This function may
shorten your setting (if you don't use some values, you needn't set them to
null) or avoid creating projectile with the last created one's effects.
Ver 1.1
- From now on, target unit/point and projectile's source will be stored at SPSD
(stored projectile system's data) variables.
- Allowed the user to destroy destructibles around target point area.
- System will reset Projectile_Trigger after each run time.
- Added a new example spell.
- Fixed a bug that created wrong dummy.
It would be nice if you were to post the triggers for those who aren't on their computers to be able to give you feedback as well.
Also, this may surprise you, but some people here don't have Warcraft III installed.
edit
For some odd reason, this has Custom scripts that say "Unknown" and there's a global setting in the InitGlobals function that's setting a trigger variable to "TriggerNull" rather than "null".
It's probably your version of the World Editor writing the file differently or something.
The custom script "Unknown" crashes my World editor when I attempt to edit it.
I'll fix this for you and give you a version of your map that can be opened with any editor, one moment.
edit
Okay, this is going to be harder than I thought >.>
Could you post the triggers so I can decipher what the rest of the "Unknowns" are?
It's usually more readable to avoid those one-liner if blocks and enumeration blocks =o (Pick every unit in ...)
edit
Also, you don't need that location array.
Using 3 location variables is totally fine.
I would also recommend making a couple of variables that store the target unit, the source unit,
and some other data so that when you run the trigger for the user, he would be able to access that data.
(Sort of like how DamageEngine by Bribe has DamageEventSource, DamageEventTarget and DamageEventAmount.
Don't create a dummy and order him to harvest, create a dummy on Map Initialization and use him, because that would be far more efficient
Create the dummy, give him Locust, make him invulnerable, then hide him.
It's necessary because what you can do on map initialization should not be left for game-time
(There's this rule in programming: What can be done at compile time shouldn't be left for run-time)
Creating units is a slow operation, so creating one dummy per destructable may slow things down quite a lot =o
^ What you said is quite difficult to... understand :| or my English isn't good enough to understand it totally.
- You said it's unnecessary to create dummy per destructible, so I will not create it. My solution is using CSP_Missile. I'll add Harvest to it then order it to harvest, anyway it will be removed after dealing damage. So, if I do this, can the problem be solved?
__________________________
I have another problem:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CPS_Destroy[CPS_Loop] Equal to True
Then - Actions
Destructible - Pick every destructible within CPS_AoE[CPS_Loop] of CPS_Point[12] and do (Actions)
Loop - Actions
Unit - Order CPS_Missile[CPS_Loop] to Harvest (Picked destructible)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(String((Current order of CPS_Missile[CPS_Loop]))) Equal to harvest
Then - Actions
Destructible - Kill (Picked destructible)
Else - Actions
Else - Actions
It does not destroy brigde, but destroy ramp and other destructibles
hmmm... if it was updated and was not yet checked by Maggy, it should say pending on the picture in the spells list, but this one says Needs fix... so it's either maggy checked it and set it to needs fix or maggy was actually the one that updated it...
The arcing animation of the missile is ugly,you can use some other methods like GetZAngle or check other missiles systems for formulas.
In this part of code:
Unit - Create 1 CPS_DummyType for (Owner of Projectile_Source) at CPS_SourcePoint[CPS_MUI] facing CPS_Angle degrees
Unit - Add Crow Form to (Last created unit)
Unit - Remove Crow Form from (Last created unit)
Unit - Move (Last created unit) instantly to CPS_SourcePoint[CPS_MUI]
Animation - Change (Last created unit) flying height to Projectile_Height at 0.00
Animation - Change (Last created unit)'s size to (Projectile_Size%, 0.00%, 0.00%) of its original size
Special Effect - Create a special effect attached to the origin of (Last created unit) using Projectile_Model
Set CPS_Missile[CPS_MUI] = (Last created unit)
Move the CPS_Missile var after the dummy is created,then use it in the parameters instead of last create unit. This is a missile system,we need speed bro.
Same goes to the Picked Destructable and Picked Unit. You should cache these kind of parameters inside variables to increase speed.
I suggest to get rid of damage,destroy trees, special effect on drop, etc.,you should use a much friendlier, much easier to use method,its what we call Custom Event. You should use a real variable,then change its value depending on what event you want. You can check Unit Indexer and Unit Event for an example.
Unit - Add Crow Form to (Last created unit)
Unit - Remove Crow Form from (Last created unit)
AFAIK, this is not a safe method. This is a safe method:
Custom script : if UnitAddAbility(bj_lastCreatedUnit, 'Amrf') and UnitRemoveAbility(bj_lastCreatedUnit, 'Amrf') then
Custom script : endif
50 fps is bad,make it 33 fps or 32 fps or 25 fps(in other words,the loop must be 0.03 or 0.03125 or 0.04)
Set TempPoint = (Center of (Playable map area))
Unit - Create 1 CPS_DummyType for Neutral Passive at TempPoint facing Default building facing degrees
Unit - Add Harvest (Neutral) to (Last created unit)
Set CPS_Dummy = (Last created unit)
Custom script: call RemoveLocation(udg_TempPoint)
Move the CPS_Dummy above then use it as the parameter for Last Created unit in Add Harvest. Don't use your own dummy,use Peasant,hide it then add Locust(via trigger),but this is optional.
You don't need to move the dummy when destroying trees.
This is my review for now.Mainly,the other reviews I didn't put is for the Dummy Object Datas.
This system is still developed, and I'm gonna update it at this weekend to fix some problems. I can't update it right now because my computer is in trouble.
I think you could use SetUnitX and the y equivalent instead of moving unit instantly with GUI. You could then ignore pathing checks and the system would be faster. Move unit instantly is a performance expensive action.
I think you could use SetUnitX and the y equivalent instead of moving unit instantly with GUI. You could then ignore pathing checks and the system would be faster. Move unit instantly is a performance expensive action.
I think it would really make the system better, but i'm not sure if I can handle this myself. Author is afk for now, anyone could "upgrade" his system? And so I will be really grateful.
For the rain of arrows kind of spell. When I put in another Sylvannas in the map, and make both heroes fire the spell (as close to each instance as possible) at the same time, then the first caster only shoots 2-3 waves, while the second caster shoots the default 5. Is this supposed to be happening?
So you didn't read the very first box of text in the resource description...?
This system allows you to create spell in a simpler way with these feathers: o Simply create a straight projectile ... o Can activate following trigger when hit (allow you to create attaching effect (like stun, knock back,...).
If you're not going to read literally anything about a resource, then don't comment on it asking how it works or if it does something. Get your head out of your ass and use your eyes. The idiocy you just displayed is unbelievable.
The text is not a "wall" it's a description you are supposed to read to see if the resource is useful for your purposes.
If you're not going to read literally anything about a resource, then don't comment on it asking how it works or if it does something. Get your head out of your ass and use your eyes. The idiocy you just displayed is unbelievable.
The text is not a "wall" it's a description you are supposed to read to see if the resource is useful for your purposes.
Didn't see scrolling through the details, but does anyone have an approximation on how many instances of this system can be sustained at once before lag becomes noticeable? I'm running a really powerful comp so I can't compare myself to the average player very well.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.