- Joined
- Jun 7, 2007
- Messages
- 196
A trigger doesn't work, but I cannot find what's wrong with it.
Please tell me if you can see what's wrong with it.
What the trigger is NOT supposed to do/be:
MUI, 'MPI' or leakless.
What the trigger IS supposed to do/be:
A test of concept.
I want to have n amount of inventories with their data stored in variables.
I want to be able to change the current inventory via abilities in a spellbook.
What I think might be the problem:
Using Item-Variables just won't work. I should use ItemType-Variables instead.
Please tell me if you can see what's wrong with it.
What the trigger is NOT supposed to do/be:
MUI, 'MPI' or leakless.
What the trigger IS supposed to do/be:
A test of concept.
I want to have n amount of inventories with their data stored in variables.
I want to be able to change the current inventory via abilities in a spellbook.
What I think might be the problem:
Using Item-Variables just won't work. I should use ItemType-Variables instead.
Global Variables ect.
Integer - ActiveBag
Item Array - BackpackItem
Abilities
Spellbook - Bags
Channel - Bag1, Bag2, Bag3
Integer - ActiveBag
Item Array - BackpackItem
Abilities
Spellbook - Bags
Channel - Bag1, Bag2, Bag3
-
D Setup
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set ActiveBag = 0
-
-
-
D01
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Ability being cast) Equal to Bag1
-
(Ability being cast) Equal to Bag2
-
(Ability being cast) Equal to Bag3
-
-
-
-
Actions
-
Cinematic - Clear the screen of text messages for (All players)
-
Game - Display to (All players) the text: (Name of (Item carried by Warden 0000 <gen> in slot 1))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
((Ability being cast) Equal to Bag1 ) and (ActiveBag Equal to 0)
-
((Ability being cast) Equal to Bag2 ) and (ActiveBag Equal to 1)
-
((Ability being cast) Equal to Bag3 ) and (ActiveBag Equal to 2)
-
-
-
-
Then - Actions
-
Game - Display to (All players) the text: D01 Skipped
-
Skip remaining actions
-
-
Else - Actions
-
-
Game - Display to (All players) the text: D01 Running...
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
Wait 0.01 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item carried by (Triggering unit) in slot (Integer A)) Equal to No item
-
-
Then - Actions
-
Set BagItem[((Integer A) + (ActiveBag x 6))] = No item
-
Game - Display to (All players) the text: ((Item + (String((Integer A)))) + = No Item)
-
-
Else - Actions
-
Wait 0.01 seconds
-
Set BagItem[((Integer A) + (ActiveBag x 6))] = (Item carried by (Triggering unit) in slot (Integer A))
-
Game - Display to (All players) the text: (((Item + (String((Integer A)))) + = ) + (Name of BackpackItem[((Integer A) + (ActiveBag x 6))]))
-
Hero - Drop BackpackItem[((Integer A) + (ActiveBag x 6))] from (Triggering unit)
-
Item - Hide BackpackItem[((Integer A) + (ActiveBag x 6))]
-
-
-
-
-
Game - Display to (All players) the text: (ActiveBag = + (String(ActiveBag)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Bag1
-
-
Then - Actions
-
Set ActiveBag = 0
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Bag2
-
-
Then - Actions
-
Set ActiveBag = 1
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Bag3
-
-
Then - Actions
-
Set ActiveBag = 2
-
-
Else - Actions
-
-
Game - Display to (All players) the text: (ActiveBag = + (String(ActiveBag)))
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
Wait 0.01 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BackpackItem[((Integer A) + (ActiveBag x 6))] Equal to No item
-
-
Then - Actions
-
Game - Display to (All players) the text: ((Item + (String((Integer A)))) + = No Item)
-
Do nothing
-
-
Else - Actions
-
Game - Display to (All players) the text: (((Item + (String((Integer A)))) + = ) + (Name of BackpackItem[((Integer A) + (ActiveBag x 6))]))
-
Item - Show BackpackItem[((Integer A) + (ActiveBag x 6))]
-
Wait 0.01 seconds
-
Hero - Give BackpackItem[((Integer A) + (ActiveBag x 6))] to (Triggering unit)
-
-
-
-
-
-