- Joined
- Jun 27, 2010
- Messages
- 2,750
So I made a bag system. You have two bags - main and second. The problem here is that When both bags are full and I try to switch from the second to the main nothing happens except that the ability is switched.
To explain the trigger easier:
I create two bags for each player in the initialization.
When you switch to the second bag the items from your hero go to the first bag and the items from the second bag go to your hero
when switch to main bag the items from your hero go to the second bag and the items from the main bag go to the hero.
To explain the trigger easier:
I create two bags for each player in the initialization.
When you switch to the second bag the items from your hero go to the first bag and the items from the second bag go to your hero
when switch to main bag the items from your hero go to the second bag and the items from the main bag go to the hero.
-
Hero Backpack
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Use Main Backpack
-
-
Then - Actions
-
Set B_P_N = (Player number of (Owner of (Triggering unit)))
-
Hero - Give (Item carried by Hero[B_P_N] in slot 1) to Backpack_Secondary[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 2) to Backpack_Secondary[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 3) to Backpack_Secondary[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 4) to Backpack_Secondary[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 5) to Backpack_Secondary[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 6) to Backpack_Secondary[B_P_N]
-
-------- ----------------------- --------
-
Hero - Give (Item carried by Backpack_Main[B_P_N] in slot 1) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Main[B_P_N] in slot 2) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Main[B_P_N] in slot 3) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Main[B_P_N] in slot 4) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Main[B_P_N] in slot 5) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Main[B_P_N] in slot 6) to Hero[B_P_N]
-
-------- ----------------------- --------
-
Unit - Remove Use Main Backpack from (Triggering unit)
-
Unit - Add Use Second Backpack to (Triggering unit)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Use Second Backpack
-
-
Then - Actions
-
Set B_P_N = (Player number of (Owner of (Triggering unit)))
-
Hero - Give (Item carried by Hero[B_P_N] in slot 1) to Backpack_Main[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 2) to Backpack_Main[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 3) to Backpack_Main[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 4) to Backpack_Main[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 5) to Backpack_Main[B_P_N]
-
Hero - Give (Item carried by Hero[B_P_N] in slot 6) to Backpack_Main[B_P_N]
-
-------- ----------------------- --------
-
Hero - Give (Item carried by Backpack_Secondary[B_P_N] in slot 1) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Secondary[B_P_N] in slot 2) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Secondary[B_P_N] in slot 3) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Secondary[B_P_N] in slot 4) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Secondary[B_P_N] in slot 5) to Hero[B_P_N]
-
Hero - Give (Item carried by Backpack_Secondary[B_P_N] in slot 6) to Hero[B_P_N]
-
-------- ----------------------- --------
-
Unit - Remove Use Second Backpack from (Triggering unit)
-
Unit - Add Use Main Backpack to (Triggering unit)
-
-
Else - Actions
-
-
-
Last edited: