[Help][Spell] Enchanted Lancet

ZXD

Level 2
Hello,
im currently in progress with a Project http://eurobattle.net/showthread.php?t=60928 ,
and now im stuck at making a Spell, and i hope somebody could atleast point me the right direction how to fulfill my idea:

Enchanted Lancet (Based on Shadow Strike)
this is the triggering spell. Has Cooldown and mana cost, Cast Range is at 800.
Damage and else things are all at 0.

Fire Lancet/Ice Lancet/Lightning Lancet
these are the spells that are supposed to be randomized.

Now how can i do so that each time Enchanted Lancet is being cast, that System randomly picks out 1 of those 3 Spells and order a dummy unit to Cast it on the target of Enchanted Lancet.

i know hwo to order a dummy to cast a spell, but im of no idea how to do so that it picks one out of those 3 spells, each time the Enchanted Lancet is being cast, it supposed to be random.

GhostWolf

Level 29
Take a random integer between 1 and 3, if it equals to 1 cast ability 1, if it equals to 2 cast ability 2, if it equals to 3 cast ability 3. Its as simple as that

ZXD

Level 2
Take a random integer between 1 and 3, if it equals to 1 cast ability 1, if it equals to 2 cast ability 2, if it equals to 3 cast ability 3. Its as simple as that

god thank you

Edit: ok i tried it out, it didnt work, heres pic :S

Reference:
Ive set on every ability the activation command to Shadow Strike, i mean the one Turn On String thing.

Last edited:

Metov

Level 3
try this

• Enchanted Lancet
• Events
• Unit - A unit Starts the effect of an ability
• Conditions
• (Ability being cast) Equal to Enchanted Lancet
• Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Random integer number between 1 and 3) Equal to 1
• Then - Actions
• Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
• Unit - Add Fire Lancet to (Last created unit)
• Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Target unit of ability being cast)
• Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Random integer number between 1 and 2) Equal to 1
• Then - Actions
• Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
• Unit - Add Ice Lancet to (Last created unit)
• Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Target unit of ability being cast)
• Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
• Else - Actions
• Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
• Unit - Add Lightning Lancet to (Last created unit)
• Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Target unit of ability being cast)
• Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

Level 2
il try this,
thanks

GhostWolf

Level 29
Remove the point leaks "(position of triggering unit)".

Metov

Level 3
position of triggering unit leaks? didnt know that

Replies
6
Views
528
[Trigger] Help
Replies
4
Views
348
Replies
3
Views
318
[Trigger] Scatter Shot Help
Replies
11
Views
897
Replies
6
Views
623