HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Psychic Blast

11-29-2003, 03:37 PM#1
ElvenCommander
I'm making an ability which is somekind of war stomp that stuns units depending on te mana they have, I based it on Warstomp, reduced stun duration to 0 and made a trigger:

Trigger 1:
Actions:
-Pick every unit within 300 of casting unit matching(some exceptions, like mechanical and structure) and Add picked unit to PB_Group
-Pick every unit in PB_group and do
Pause picked unit
Start stun_duration as a one-shot timer that will expire in (3+(mana of picked unit/200))

Trigger 2:
Event: stun_duration expires
Actions:
-Pick every unit in PB_group and unpause picked unit


my problem is that it stuns unit depending on the unit that has more mana in the group, I knew I would have that problem, but I don't know what trigger should I do

If this can be done what trigger should I add?
11-29-2003, 04:25 PM#2
FerretDruid
I might be able to help if you post the exact trigger, I think your unit group action is the problem but I can't see why... Copy it as text from your actual trigger.
11-29-2003, 05:21 PM#3
vjeux
The probleme is the timer is the mana of last picked unit

Try to add an array into timer => timer[x]
Declare an integer (i)

Trigger 1:
Actions:
-Pick every unit within 300 of casting unit matching(some exceptions, like mechanical and structure) and Add picked unit to PB_Group
-Pick every unit in PB_group and do
Pause picked unit
set i = i + 1
if i > 1000 then i = 0
Start timer[i] as a one-shot timer that will expire in (3+(mana of
picked unit/200))


Trigger 2:
Event:
timer[1] expires
timer[2] expires
timer[3] expires
timer[4] expires
timer[5] expires
timer[6] expires
timer[7] expires
timer[8] expires
timer[9] expires
timer[10] expires
[...] to 1000
If you use UMSWE you can make a loop 1 to 1000 and add this event in this trigger :)
Actions:
-Pick every unit in PB_group and unpause picked unit

I think it will work

11-29-2003, 10:06 PM#4
ElvenCommander
and how do we do a loop with UMSWE(im new to it)
11-29-2003, 10:52 PM#5
vjeux
Code:
For each (Integer A) from 1 to 1000, do (Actions)
    Loop - Actions
        Trigger - Add to Trigger 2 <gen> the event (Time - Timer[(Integer A)] expires)
 
11-30-2003, 06:26 PM#6
ElvenCommander
no still doesn't work, they all unstun at the same time
11-30-2003, 06:48 PM#7
vjeux
Yes ...

make a variable u of type : unit
make a variable unit of type : unit
make a variable time of type : real

delete your trigger 2
and replace with this :

Custom Script : local unit udg_u
Set u = unit
Unit - pause u
Wait (3+(mana of u/200))
Unit - Unpause u

in the Trigger 1
Delete Start Timer
And add :
Set unit = (Picked Unit)
Trigger - Run Trigger 1 ignoring condition


Just a question about points, how give points and how get it ?
Thx :D

11-30-2003, 06:54 PM#8
linkmaster23
LoL, im not sure what your trying to accomplish here. But i think he has it covered.