HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Looking for potion trigger help

06-30-2008, 08:23 AM#1
Bustaboom
I cant seem to figure out how to make a trigger that works when you use a potion (Item) which heals the unit using it over time. So click potion > heal unit for 50% oh total hp over 5 seconds. but it want this to be independent of the item so they can use it over and over if they want to and it stacks.

Thanks
Bustaboom
06-30-2008, 03:13 PM#2
Themerion
The trick is to use a "local" variable with the same name as a global variable. This ought to work:

Create the global variable "ItemHealTarget" (unit).

Trigger:
Actions
Custom Script: local unit udg_ItemHealTarget
Set ItemHealTarget=(Hero Manipulating Item)
------- -------
Wait 1.00 seconds
Unit - Set life of ItemHealTarget to (10.00 + (Percentage life of ItemHealTarget))%
Wait 1.00 seconds
Unit - Set life of ItemHealTarget to (10.00 + (Percentage life of ItemHealTarget))%
Wait 1.00 seconds
Unit - Set life of ItemHealTarget to (10.00 + (Percentage life of ItemHealTarget))%
Wait 1.00 seconds
Unit - Set life of ItemHealTarget to (10.00 + (Percentage life of ItemHealTarget))%
Wait 1.00 seconds
Unit - Set life of ItemHealTarget to (10.00 + (Percentage life of ItemHealTarget))%
Custom Script: set udg_ItemHealTarget = null
07-01-2008, 04:26 AM#3
Bustaboom
You are awesome thank for very much