- Joined
- May 8, 2010
- Messages
- 150
2 Problems
Problem 1-
I have made an ability which is completly triggered..
its based off the firebolt ability, and what i want it to do is to have the abilities damage based on the heroes attributes.. which i have solved..
but my problem is the stun.. i want it to stun a unit for a random time between 2-5.
What i've done so far is create a 10 abilities[because this spell with have more levels and longer stun times] based off the storm bolt ability which stun a unit for 1-10 seconds.
I put all these into an ability variable and when needed to be cast.. it will choose one of the storm bolt abilities[at random- for the random stun]
but it doesnt seem to work.
[trigger=Firebolt]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Firebolt
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (4.00 x (Real((Intelligence of (Triggering unit) (Include bonuses))))) damage of attack type Spells and damage type Normal
Set Stun2[(Player number of (Triggering player))] = (Random integer number between 1 and 6)
Floating Text - Create floating text that reads (String(Stun2[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 0.25 seconds
Floating Text - Create floating text that reads (String(((Integer((Real((Intelligence of (Triggering unit) (Include bonuses)))))) x 4))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Unit - Create 1 Stun Dummy for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add StunAb[Stun2[(Player number of (Triggering player))]] to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Unit - Remove (Last created unit) from the game
Else - Actions
[/trigger]
Stun2 = Random number.. so it becomes a random stun..
Can someone help me out on why the dummy wont cast the spell or what lol?
Problem 2
I've got a Regeneration spell which is triggered.. and when activated.. every 1 second it adds the intelligence of the hero to the units hp.
BUTTT..
the problem is.. the trigger heals the targeted unit once..and then after that it doesnt seem to bother with the rest of the triggering..
[trigger=Regeneration]
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Regeneration
Actions
If ((Level of Regeneration for (Triggering unit)) Equal to 1) then do (Set RegenerationValue[(Player number of (Triggering player))] = (1.00 x (Real((Intelligence of (Triggering unit) (Include bonuses)))))) else do (Set RegenerationValue[(Player number of (Triggering player))] = (1.50 x (Real((Intelligence of (Triggering unit) (Include bonuses))))))
Set RegenWhole[(Player number of (Triggering player))] = (Integer(RegenerationValue[(Player number of (Triggering player))]))
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
[/trigger]
Can someone either tell me how to fix that.. or help me make an alternative trigger.
Helpers +rep as always.
-pRo
Problem 1-
I have made an ability which is completly triggered..
its based off the firebolt ability, and what i want it to do is to have the abilities damage based on the heroes attributes.. which i have solved..
but my problem is the stun.. i want it to stun a unit for a random time between 2-5.
What i've done so far is create a 10 abilities[because this spell with have more levels and longer stun times] based off the storm bolt ability which stun a unit for 1-10 seconds.
I put all these into an ability variable and when needed to be cast.. it will choose one of the storm bolt abilities[at random- for the random stun]
but it doesnt seem to work.
[trigger=Firebolt]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Firebolt
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (4.00 x (Real((Intelligence of (Triggering unit) (Include bonuses))))) damage of attack type Spells and damage type Normal
Set Stun2[(Player number of (Triggering player))] = (Random integer number between 1 and 6)
Floating Text - Create floating text that reads (String(Stun2[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 0.25 seconds
Floating Text - Create floating text that reads (String(((Integer((Real((Intelligence of (Triggering unit) (Include bonuses)))))) x 4))) above (Target unit of ability being cast) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Unit - Create 1 Stun Dummy for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add StunAb[Stun2[(Player number of (Triggering player))]] to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Unit - Remove (Last created unit) from the game
Else - Actions
[/trigger]
Stun2 = Random number.. so it becomes a random stun..
Can someone help me out on why the dummy wont cast the spell or what lol?
Problem 2
I've got a Regeneration spell which is triggered.. and when activated.. every 1 second it adds the intelligence of the hero to the units hp.
BUTTT..
the problem is.. the trigger heals the targeted unit once..and then after that it doesnt seem to bother with the rest of the triggering..
[trigger=Regeneration]
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Regeneration
Actions
If ((Level of Regeneration for (Triggering unit)) Equal to 1) then do (Set RegenerationValue[(Player number of (Triggering player))] = (1.00 x (Real((Intelligence of (Triggering unit) (Include bonuses)))))) else do (Set RegenerationValue[(Player number of (Triggering player))] = (1.50 x (Real((Intelligence of (Triggering unit) (Include bonuses))))))
Set RegenWhole[(Player number of (Triggering player))] = (Integer(RegenerationValue[(Player number of (Triggering player))]))
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
Wait 1.00 seconds
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RegenerationValue[(Player number of (Triggering player))])
Floating Text - Create floating text that reads (String(RegenWhole[(Player number of (Triggering player))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 5.00 seconds
[/trigger]
Can someone either tell me how to fix that.. or help me make an alternative trigger.
Helpers +rep as always.
-pRo