HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can i do...

02-25-2003, 03:45 AM#1
Holimion
Can i do a massive entangle? like entangling 10 units at the same time?
02-25-2003, 04:00 AM#2
Guest
I believe so, but for it to work, you need to edit the .txt's so that the ability has an Area of Effect spell model and or art.

I'm not positive though.

Also make sure you edit the AoE of the spell to whatever radius you please.
02-25-2003, 04:09 AM#3
DaKaN
no that wont work because the spell behavior is hard coded, instead what i recomend is take earthquake or thunderclap, increase the slow duration and make the slow 100%, change the spell targer effect to be the entangle effect, it should give the same desired effect in the end...
02-25-2003, 04:19 AM#4
Guest
Can't you just summon a helper unit that casts entange on all units within n units from target and the is removed?
02-25-2003, 04:21 AM#5
DaKaN
i think the unit would be noticible, + even with no cooldown i dont think the spell can be casted that fast... not sure though
02-25-2003, 05:00 AM#6
Aiursrage2k
You could make a trigger to execute when entangle is done, then pick n number of units within the radius, pause the units place a root special effect on each unit. Next run a timer, and every time it expires make it damage the selected units, also have a counter and when it reaches a predefined number destroy the special effects, turn off the timer and un pause the units.
02-25-2003, 11:24 AM#7
STURMguy22
but when u make the root effect for each unit--u would have to destryo them one by one. u wold have to put all of the special effects into a variable nd kill them that way, and it gets very complicated

What im doin for that kind of thing, is im having 10 units on the side that they cant see to cast spells (modified range) on the units on the regular map. That way there will always be osoneone to cast the spell
02-25-2003, 11:49 AM#8
Electromancer
Units have a casting time, depending on there model type and the spell. And some spells already have 0 casting time (slow) but they arent cast really fast. Actually, it takes an average of about 3 seconds between each casting on the sorceress model.
02-25-2003, 07:51 PM#9
STURMguy22
thats why ill havbe like 12 units all with the spells ill need that the heroes dont already have. Whenever i need something like that, i will make all the units cast the spell on the group of units, or one unit--they wont all cast the spell because wc3 doesnt do that (like when u have a group of 12 sorcs and u tell them all to ploymorph one thing, only one does it)--that way it will use 1/12 and the rest will be able to do what they need to
02-25-2003, 08:42 PM#10
Guest
Take a look at Darky's mass AMS example map, that's what I'm thinking of.
02-26-2003, 02:09 AM#11
Holimion
where can i find that parkan?
02-26-2003, 04:57 AM#12
dataangel
The best way would be to use custom text to create one custom invisible unit for every unit that it's going to be cast on, have those units cast entangle, then destroy them.
02-26-2003, 10:50 AM#13
Tapek
Quote:
Originally posted by Dakan
no that wont work because the spell behavior is hard coded, instead what i recomend is take earthquake or thunderclap, increase the slow duration and make the slow 100%, change the spell targer effect to be the entangle effect, it should give the same desired effect in the end...


This looks like the easiest way... why can't you use that?
(Change damage to units and lower damage so its the same as entangle. It's exactly what you want - why bother with all the 'create unit' stuff?)
02-26-2003, 04:54 PM#14
DaKaN
not exactly the same since entangle does DOT and this would either do no damage or all the damage at the same time
02-26-2003, 05:20 PM#15
BoddoZerg
Code:
DISCLAIMER: All JASS code herein should be regarded as pseudocode.

The way I cast buffs on multiple units is this:

Make a custom unit with a custom version of your spell (such as Entangle) that has 99999 range, costs 0 mana, has 0 cooldown, and can be cast on friend, enemy, or neutral. Also give the custom unit a sight range of 0 and use UMSWE to set its Spell Cast Point and Spell Cast Backswing to 0, and its turning speed to 3. It's also nice to make it Invisible, Invulnerable, and Ethereal. (So it won't get in the way)

Put several of the custom spell-casting unit (Neutral Passive controlled) in a corner of the map. In this example, I'll use 6.

Make the following variables:
udg_BuffCaster[] = Unit Array
udg_BuffIndex[] = Integer = 0
udg_BuffTarget[] = Unit Array
udg_BuffType[] = String Array
udg_BuffCooldown = Timer

Now use a trigger like this.
Map Initialization:
Code:
set udg_BuffCaster[0] = gg_Buff_Caster_0000
set udg_BuffCaster[1] = gg_Buff_Caster_0001
set udg_BuffCaster[2] = gg_Buff_Caster_0002
set udg_BuffCaster[3] = gg_Buff_Caster_0003
set udg_BuffCaster[4] = gg_Buff_Caster_0004
set udg_BuffCaster[5] = gg_Buff_Caster_0005

Whenever you want to cast a buff on a unit, do the following:
Code:
set udg_BuffIndex = udg_BuffIndex + 1
set udg_BuffTarget[udg_BuffIndex] = (Target Unit)
set udg_BuffType[udg_BuffIndex] = "entanglingroots"
call ExecuteTriggerConditional( gg_trg_BuffTrigger )*
* This must be a conditional trigger call!

Buff Trigger:
Events :
Timer Expires - BuffCooldown
Conditions :
Time remaining on BuffCooldown == 0.00
BuffIndex > 0
Actions:
Code:
local integer i = 0
    loop
        exitwhen i > IMinBJ( udg_BuffIndex, 6 )
        call IssueTargetOrderBJ( udg_BuffCaster[i], udg_BuffType[i], udg_BuffTarget[i] )
        set udg_BuffTarget[i] = udg_BuffTarget[i+6]
        set udg_BuffType[i] = udg_BuffType[i+6]
        set i = i + 1
    endloop
    set udg_BuffIndex = IMaxBJ( (udg_BuffIndex-6), 0 )
    call StartTimer( udg_BuffCooldown, 0.1 )

A quick explanation of all this:
You have 6 neutral units in the corner capable of casting buffs on any unit on the map. (This to be MUCH less laggy than constantly creating invisible buff-casters and destroying them after they're done. Creating and destroying units very quickly causes a memory leak.) Every time you want to cast a buff, add a buff to an array that serves as a buff queue. This queue (with the BuffCooldown timer and conditional trigger calls) ensures that you will not overwhelm the buff casters' ability to cast buffs. Although they have no cast time (CastPoint and CastBackswing determine how long it takes for them to cast) and no cooldown, they still take a short time to cast. (I use 0.1 seconds, it works for me)

Now, any time you need to cast a buff on a unit, simply add 1 to BuffIndex, set the BuffType to what you want, and the BuffTarget to the proper unit.

Detecting the casting of an area effect buff spell is actually harder than doing the buff itself.