- Joined
- Nov 6, 2008
- Messages
- 8,316
Apparently, I came along with a problem. I am using the fancy Hashtables in GUI, so, there is a problem I can't get to work out.
I want to have a spell, that, when a unit casts it, it will create a unit, which will slowly fade, until vanish (don't ask why, just have the concept).
The trigger in non-MUI-involved thing would go like:
I want to have a spell, that, when a unit casts it, it will create a unit, which will slowly fade, until vanish (don't ask why, just have the concept).
The trigger in non-MUI-involved thing would go like:
-
Trigger
-
Events
-
Unit - A unit starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Vanish
-
-
Actions
-
Set Point1 = (Position of (Triggering unit))
-
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point1 facing default building degrees
-
Set Unit1 = (Last created unit)
-
Custom script: call RemoveLocation (udg_Point1)
-
-
Trigger1
-
Events
-
Time - Every 0.6 seconds of game-time
-
-
Conditions
-
(Unit1 is alive) Equal to True
-
-
Actions
-
Set Transparency = ((Transparency) + 1)
-
Animation - Change (Unit1)'s vertex modifier to (100.00, 100.00, 100.00)% and (Transparency)% transparency
-
-
Trigger
-
Events
-
Unit - A unit starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Vanish
-
-
Actions
-
Set Point1 = (Position of (Triggering unit))
-
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point1 facing default building degrees
-
Hastable - Save Handle of (Last created unit) as 0 of (Key (Triggering unit)) at (Hash1)
-
Custom script: call RemoveLocation (udg_Point1)
-
-
Trigger1
-
Events
-
Time - Every 0.6 seconds of game-time
-
-
Conditions
-
((Load 0 of (Key([U][B]WHAT KEY goes here?[/B][/U])) in (Hash1)) is alive) Equal to True
-
-
Actions
-
---Now, I want an increasing integer. How can I use it in a Hash, when I still use a global variable? How can I make it work as MUI?---
-
Set Transparency = ((Transparency) + 1)
-
Hashtable - Save (Transparency) as 1 of (Key([U][B]What key here? I need this "Transparency" variable attached to the "Last created unit" of the previous trigger; so, how can I attach it?[/B][/U])) in (Hash1)
-
Unit - Change (Load 0 of (Key(What key??))) vertex modifier to (100.00, 100.00, 100.00)% and (Load 1 of (Key([U][B]This will refer to the "Transparency" variable, but, what Load again?[/B][/U]))% transparency
-