HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Custom Sleep Problem

02-24-2004, 12:37 PM#1
Uzhgi
I'm trying to make a area effect sleep using triggers.. but it doesnt seem to work... for now the sleep is still normal and I have this trigger:

Events:
- Unit - A unit Begins casting an ability

Conditions:
- (Ability being cast) Equal to Sleep

Actions:
- Pick every unit in (Units within 500.00 of (Position of (Target unit of ability being cast))) and do (Unit - Make (Picked unit) Sleep when unprovoked)
- Wait 2.00 seconds
- Pick every unit in (Units within 500.00 of (Position of (Target unit of ability being cast))) and do (Unit - Wake up (Picked unit))

Whats the problem??
02-24-2004, 03:06 PM#2
Cubasis
Hmm+

There was a problem with "Target of issued ability" resetting when you wait. I'm not totally sure if they fixed it in 1.13 or sumtin.

So either that's your problem, or else, if it isn't, then it's just the "sleep" action's inner setting that makes this not work. Normally when people try to make units sleep, they lock/stop/freeze (don't remember the correct name) the units using a unit - freeze/whatever action. As i said, i don't remember it right now, but that completely stops the unit, and then it's just up to you to add teh special effect to the units (sleep).

Cubasis
02-24-2004, 05:35 PM#3
Uzhgi
K... well I'm new to trigger-edited spells.. but I'll try to find way ;)

Besides... thx a lot :D
02-24-2004, 05:37 PM#4
xGT4x
1. Change Event to A unit starts the effect of an ability, as it now is when he starts casting it gets activated but when he stops a short time after the Order the effect wil work but the mana is still like before and cooldown doesn't work then, too.
2. Like Cubasis40 said with Target unit of ability being cast doesn't work.
3. The sleep you made is the one the creeps do, it works only for them, too and is totally different.
4. The right one I posted in other Thread you asked for it, was in Editing Tools section...
02-24-2004, 05:56 PM#5
Uzhgi
I've asked this a different place??
02-24-2004, 06:03 PM#6
xGT4x
Yes you did, Link: here
02-24-2004, 06:47 PM#7
volatile
If you want an AOE spell, use flamestrike with no dmg and no art.
That will be your dummy spell

Set upon map initialization to create dummy caster units with the "sleep" ability set to the duration that you want.

example of that trigger would be
A
for each integer a from 1 to 50
create 1 dummycasterunit at center of map area
turn off collision of last created unit
hide last created unit
set DUMMYCASTER[integera] to last created unit

that will set up 50 dummy casters for ya at map initialization under the variables "DUMMYCASTER[1], [2], [3], etc.. etc... to [50]"

Now say unit issued order targeting point
(dummy flamestrike targets a point)
issued order equal to "flamestrike"
set GROUP = all enemy units within 500 of target point of issued order.
set COUNT = number of units in GROUP
for each integer a from 1 to COUNT
loop
set TARGETSLEEP[integera] to random unit from GROUP
remove TARGETSLEEP[integera] from GROUP

next trigger unit begins effect of ability
ability being cast equal to DUMMYFLAMESTRIKESPELL
for each integera from 1 to COUNT
loop
Order dummycasterarray[integera] to undead - sleep TARGETSLEEP[integera]

This trigger will sleep everyone in an area within 500 of your target point that's an enemy for the duration you set your sleep spell for. If you want 3 different levels set up another trigger...

unit learn skill
learned skill = to DUMMYSLEEPSPELL
set n = n + 300

and replace your distance (500 *see above) with the variable "n" so that the distance will increase with level.
If you want 3 different durations of sleep, then you will need to create 3 dummy casters with different durations on the same sleep spell "one unit can't have more than 1 of the same spell, so you cant' give 1 unit 3 different levels of the ability..." then set them to different variables... that's a little more complicated, if you really want me to explain it I will... but... I would prefer not too lol.... I'll just post some triggers that I have done and you can learn from there, I'll post something for you if you like. But generally that's the way to do the trigger you want, a little confusing yes, but go through it and ask questions and you'll never have to be confused by it again :P