• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Area of Effect Curse Abil

Status
Not open for further replies.
Level 6
Joined
May 1, 2009
Messages
156
Hi, trying to make spell that's an AOE that makes it so all units in the aoe selection ring are cursed, as in they have higher miss chance. I.e. Dota's Rikimaru, his blue cloud ability.
 
Level 1
Joined
Aug 26, 2009
Messages
1
You may want to try messing around with the Human ability 'Cloud'. I'm pretty sure DotA would spawn a dummy unit and cast the modified 'Cloud' ability.
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
2 options:

If you want it to be like rikis cloud:

1. Copy and edit the cloud ability -> edit miss values
2. Create dummy ability based on hmmmmmm I prefere monsun with 0.01 durotation
3. Create trigger:

Event: Unit starts effect of ability
Condition: Ability being cast = "dummyAbility"
Actions:

Create dummy unit at position of ability being cast
Add "yourCloud" to dummy
Make dummy cast "cloud" at target point of ability being cast
add "durotationOfYourCloud" sec timer to last created unit



If you want it to be instant like an aoe curse:

1. Copy and edit cure
2. Dummy ability based on monsun (0.01 duro)
3. Trigger

Event: unit starts effect ...
condition: ability being... = dummyAbility
action:

Pick every unit within "rangeOfSpell" of target point of ability being cast and do ac tions:
summon dummy unit
add curse to last created unit
make last created unit cast curse on picked unit
add 1 sec timer to last created unit





EDIT: just for all those guys who like to criticise this -.- THIS IS NOT LEAKFREE!!! REMOVE LEAKS YOURSELF
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
ehum ...

dummy ability blizzard the aoe there so you can see it, nullify all values
dummy ability curse
a dummy
you need a unitgroup variable, a point variable
event
unit starts effect of an ability

condition
ability being cast equal to Curse AOE

Actions
set targetpoint = target point of ability being cast
set unitgroup = units in range of "your aoe" with matching conditon not a structre, not magic immune etc

pick every unit in unitgroup and to multiple actions
loop
create dummy at targetpoint
add cursedummy ability to last created unit
set level of curse dummy to lvl of Curse AOE
order last created unit to cast unit target undead banshee curse on picked unit
Add 1 sec timer to last created unti

new actions
custom script call destroygroup(udg_unitgroup)
custom script call RemoveLocation(udg_targetpoint)

and there you got totally leakfree and MUI
 
Level 6
Joined
May 1, 2009
Messages
156
Then What's Wrong with this? :

Events
___Unit - A Unit Starts the effect of an ability
Conditions
___(Ability Being Cast) Equal to dummy AOE blizzard
Actions
___Set CursePoint = (Target point of ability being Cast)
___Set CurseGroup = (Units within 300.00 of (Target point of ability being cast))
___Unit Group - Pick every unit in CurseGroup and do (Actions)
______Loop - Actions
_________Unit - Create 1 Dummy for Player 1 (Red) at CursePoint face Default building facing degrees
_________Unit - Add dummy_curse to (Last created unit)
_________Unit - Order (Last created unit) to Undead Banshee - Curse (Picked Unit)
_________Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

___Custom script: call destroygroup(udg_CurseGroup)
___Custom script: RemoveLocation(udg_CursePoint)
 
Level 11
Joined
May 31, 2008
Messages
698
It seems like it would work. The ability curse costs mana. Make sure ur dummy ability costs 0 mana. I would just give the dummy unit the ability so you dont have to add it thru triggers. Also make sure the cast range on it is like 1000 (just to be safe). Also create the dummy for owner of triggering unit, not for player 1. Also the curse ability might have a longer casting time than 1 second. Make the dummy last for 3 seconds, but make sure u take away its attack and set the dummy curse so it has a 5 second cooldown to make sure it wont be cast twice. Also make sure the dummy has movement speed and turn speed or else it wont be able to face its target in order to cast the spell.
 
Level 6
Joined
May 1, 2009
Messages
156
There's some code wrong... idk what's wrong but the editor tells me there are codes messed up and they wont work so it disables the trigger all together.
 
Level 11
Joined
May 31, 2008
Messages
698
call destroygroup(udg_CurseGroup)
Change that to call DestroyGroup(udg_CasterGroup)
that shud fix it. Always remember to capitalize!! lol

RemoveLocation(udg_CursePoint)
change that to call RemoveLocation(udg_CursePoint)
You always gotta put call in front if you remove a point or group or whatever.
 
Level 6
Joined
May 1, 2009
Messages
156
ahh, thank you to all but just one last problem, it works fine and all but once and a while as im messing with it to make sure it works well it lags up because... i forgot the word for spells that cant be used by multiple people at same time but i fixed that problem so peolple cant use at same time but i still get that same lag effect u get wen u do it at same time. only happens once and a while tho
 
Status
Not open for further replies.
Top