Hi
I am making an ability called Combat Skill. Certain items, when carried, have to increase the level of the ability. So when you pick it up, it increases in level and when you lose it, you decrease in level.
Fails:
It works when I pick the item up and it counts for both items to a total level of 3, since you have level 1 as a standard.
However, when you lose the items 1 by 1, the first drop makes the level 3. The second drop makes the level go to 2 and stay there. So now you actually have level 2, without carrying any item.
What seems to be the issue? I am lost.
So far I've done this:
Edit:
I guess I found the issue and fixed it. It seems it counts the item within the integer before it actually drops the item.
So I seperated the trigger into 2, 1 for acquires item and 1 for loses item. In the loses item I made the array integer -1 after calculating the inventory..
I am making an ability called Combat Skill. Certain items, when carried, have to increase the level of the ability. So when you pick it up, it increases in level and when you lose it, you decrease in level.
Fails:
It works when I pick the item up and it counts for both items to a total level of 3, since you have level 1 as a standard.
However, when you lose the items 1 by 1, the first drop makes the level 3. The second drop makes the level go to 2 and stay there. So now you actually have level 2, without carrying any item.
What seems to be the issue? I am lost.
So far I've done this:
-
Combat Skill Increase
-
Events
- Unit - A unit Acquires an item
- Unit - A unit Loses an item
-
Conditions
- (Unit-type of (Triggering unit)) Not equal to Backpack
-
Actions
- Set CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))] = 1
- Set ItemCounter_Item = (Item being manipulated)
- Set ItemCounter_PickUpUnit = (Triggering unit)
- Set ItemCounter_Inventory = (Size of inventory for ItemCounter_PickUpUnit)
-
For each (Integer ItemCounter_Loop) from 1 to ItemCounter_Inventory, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Item-type of (Item carried by ItemCounter_PickUpUnit in slot ItemCounter_Loop)) Equal to Scrapped Boots (PA)
- (Item-type of (Item carried by ItemCounter_PickUpUnit in slot ItemCounter_Loop)) Equal to Henchman Bow (MH)
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set CombatSkill[(Player number of (Owner of A_Unit))] = (CombatSkill[(Player number of (Owner of A_Unit))] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Game - Display to (All players) the text: (String(CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))]))
- -------- PASSIVE CHECK --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Cunning (Passive) for ItemCounter_PickUpUnit) Equal to 1
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))] Greater than or equal to 12
-
Then - Actions
- Unit - Set level of Combat Skill for ItemCounter_PickUpUnit to 12
-
Else - Actions
- Unit - Set level of Combat Skill for ItemCounter_PickUpUnit to CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))]
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))] Greater than or equal to 10
-
Then - Actions
- Unit - Set level of Combat Skill for ItemCounter_PickUpUnit to 10
-
Else - Actions
- Unit - Set level of Combat Skill for ItemCounter_PickUpUnit to CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))]
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
Edit:
I guess I found the issue and fixed it. It seems it counts the item within the integer before it actually drops the item.
So I seperated the trigger into 2, 1 for acquires item and 1 for loses item. In the loses item I made the array integer -1 after calculating the inventory..
- Set CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))] = (CombatSkill[(Player number of (Owner of ItemCounter_PickUpUnit))] - 1)
Last edited: