Hello hive!
I am working on a simple system that spawns a destructible like crates and barrels in designated regions on the map. These barrels have a chance to drop some loot on death, my problem is getting them to drop loot on death, since they are spawned randomly in game I cannot use standard item tables. I created some triggers to handle the issue but it is not working. The trigger that makes the barrels have a chance to spawn in designated regions works, but when I destroy the crates/barrels nothing drops even though I set the chance in my trigger to 100% for testing purposes. I even made the game echo "worked" when the destructible dies but it doesn't echo.
Here are the triggers that make up my system:
This trigger sets all possible spawn zones for the loot crates. (works)
I am working on a simple system that spawns a destructible like crates and barrels in designated regions on the map. These barrels have a chance to drop some loot on death, my problem is getting them to drop loot on death, since they are spawned randomly in game I cannot use standard item tables. I created some triggers to handle the issue but it is not working. The trigger that makes the barrels have a chance to spawn in designated regions works, but when I destroy the crates/barrels nothing drops even though I set the chance in my trigger to 100% for testing purposes. I even made the game echo "worked" when the destructible dies but it doesn't echo.
Here are the triggers that make up my system:
This trigger sets all possible spawn zones for the loot crates. (works)
-
Loot Crate Zone Initialization
-

Events
-

Conditions
-

Actions
-


Set BonusLootCrateSpawnZone[0] = Loot Crate Spawn Zone 1 <gen>
-


Set BonusLootCrateSpawnZone[1] = Loot Crate Spawn Zone 12 <gen>
-


Set BonusLootCrateSpawnZone[2] = Loot Crate Spawn Zone 13 <gen>
-


Set BonusLootCrateSpawnZone[3] = Loot Crate Spawn Zone 15 <gen>
-


Set BonusLootCrateSpawnZone[4] = Loot Crate Spawn Zone 5 <gen>
-


Set BonusLootCrateSpawnZone[5] = Loot Crate Spawn Zone 8 <gen>
-


Set BonusLootCrateSpawnZone[6] = Loot Crate Spawn Zone 9 <gen>
-


Set BonusLootCrateSpawnZone[7] = Loot Crate Spawn Zone 16 <gen>
-


Set BonusLootCrateSpawnZone[8] = Loot Crate Spawn Zone 14 <gen>
-


Set BonusLootCrateSpawnZone[9] = Loot Crate Spawn Zone 11 <gen>
-


Set BonusLootCrateSpawnZone[10] = Loot Crate Spawn Zone 2 <gen>
-


Set BonusLootCrateSpawnZone[11] = Loot Crate Spawn Zone 3 <gen>
-


Set BonusLootCrateSpawnZone[12] = Loot Crate Spawn Zone 6 <gen>
-


Set BonusLootCrateSpawnZone[13] = Loot Crate Spawn Zone 7 <gen>
-


Set BonusLootCrateSpawnZone[14] = Loot Crate Spawn Zone 10 <gen>
-


Set BonusLootCrateSpawnZone[15] = Loot Crate Spawn Zone 4 <gen>
-


Set BonusLootCrateSpawnZone[16] = Loot Crate Spawn Zone 21 <gen>
-


Set BonusLootCrateSpawnZone[17] = Loot Crate Spawn Zone 20 <gen>
-


Set BonusLootCrateSpawnZone[18] = Loot Crate Spawn Zone 17 <gen>
-


Set BonusLootCrateSpawnZone[19] = Loot Crate Spawn Zone 22 <gen>
-


Set BonusLootCrateSpawnZone[20] = Loot Crate Spawn Zone 19 <gen>
-


Set BonusLootCrateSpawnZone[21] = Loot Crate Spawn Zone 35 <gen>
-


Set BonusLootCrateSpawnZone[22] = Loot Crate Spawn Zone 35 <gen>
-


Set BonusLootCrateSpawnZone[23] = Loot Crate Spawn Zone 37 <gen>
-


Set BonusLootCrateSpawnZone[24] = Loot Crate Spawn Zone 39 <gen>
-


Set BonusLootCrateSpawnZone[25] = Loot Crate Spawn Zone 40 <gen>
-


Set BonusLootCrateSpawnZone[26] = Loot Crate Spawn Zone 38 <gen>
-


Set BonusLootCrateSpawnZone[27] = Loot Crate Spawn Zone 36 <gen>
-


Set BonusLootCrateSpawnZone[28] = Loot Crate Spawn Zone 34 <gen>
-


Set BonusLootCrateSpawnZone[29] = Loot Crate Spawn Zone 33 <gen>
-


Set BonusLootCrateSpawnZone[30] = Loot Crate Spawn Zone 25 <gen>
-


Set BonusLootCrateSpawnZone[31] = Loot Crate Spawn Zone 28 <gen>
-


Set BonusLootCrateSpawnZone[32] = Loot Crate Spawn Zone 27 <gen>
-


Set BonusLootCrateSpawnZone[33] = Loot Crate Spawn Zone 26 <gen>
-


Set BonusLootCrateSpawnZone[34] = Loot Crate Spawn Zone 32 <gen>
-


Set BonusLootCrateSpawnZone[35] = Loot Crate Spawn Zone 31 <gen>
-


Set BonusLootCrateSpawnZone[36] = Loot Crate Spawn Zone 23 <gen>
-


Set BonusLootCrateSpawnZone[37] = Loot Crate Spawn Zone 30 <gen>
-


Set BonusLootCrateSpawnZone[38] = Loot Crate Spawn Zone 29 <gen>
-


Set BonusLootCrateSpawnZone[39] = Loot Crate Spawn Zone 24 <gen>
-
-
-
Loot Crate Spawn Initialization
-

Events
-

Conditions
-

Actions
-


Set LootCrateType[0] = Barrel
-


Set LootCrateType[1] = Barrel
-


Set LootCrateType[2] = Barrel
-


Set LootCrateType[3] = Crates
-


Set LootCrateType[4] = Crates
-


Set LootCrateType[5] = Crates
-


Set LootZoneCounter = 0
-


For each (Integer A) from 1 to 40, do (Actions)
-



Loop - Actions
-




Set LootCrateSpawnChance = (Random integer number between 1 and 100)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






LootCrateSpawnChance Less than or equal to 25
-
-





Then - Actions
-






Destructible - Create a LootCrateType[(Random integer number between 0 and 5)] at (Random point in BonusLootCrateSpawnZone[LootZoneCounter]) facing (Random angle) with scale 1.00 and variation 0
-






Set LootZoneCounter = (LootZoneCounter + 1)
-
-





Else - Actions
-






Set LootZoneCounter = (LootZoneCounter + 1)
-
-
-
-
-
-
-
Loot Crate Drops
-

Events
-


Destructible - A destructible within Loot Crate Spawn Zone 1 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 2 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 3 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 4 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 5 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 6 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 7 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 8 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 9 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 10 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 11 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 12 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 13 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 14 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 15 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 16 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 17 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 18 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 19 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 20 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 21 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 22 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 23 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 24 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 25 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 26 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 27 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 28 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 29 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 30 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 31 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 32 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 33 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 34 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 35 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 36 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 37 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 38 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 39 <gen> dies
-


Destructible - A destructible within Loot Crate Spawn Zone 40 <gen> dies
-
-

Conditions
-

Actions
-


Set LootChance = (Random integer number between 1 and 100)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(LootChance Greater than or equal to 1) and (LootChance Less than or equal to 100)
-
-



Then - Actions
-




Game - Display to (All players) the text: worked
-




Set LootTypeRoll = (Random integer number between 1 and 6)
-




If (LootTypeRoll Equal to 1) then do (Item - Create LowGradeConsumableItem[(Random integer number between 0 and LGC_Highest_Index)] at (Position of (Dying destructible))) else do (Do nothing)
-




If (LootTypeRoll Equal to 2) then do (Item - Create LowGradeConsumableItem[(Random integer number between 0 and LGC_Highest_Index)] at (Position of (Dying destructible))) else do (Do nothing)
-




If (LootTypeRoll Equal to 3) then do (Item - Create LowGradePowerUp[(Random integer number between 0 and LGPU_Highest_Index)] at (Position of (Dying destructible))) else do (Do nothing)
-




If (LootTypeRoll Equal to 4) then do (Item - Create LowGradePowerUp[(Random integer number between 0 and LGPU_Highest_Index)] at (Position of (Dying destructible))) else do (Do nothing)
-




If (LootTypeRoll Equal to 5) then do (Item - Create MidGradeConsumableItem[(Random integer number between 0 and MGC_Highest_Index)] at (Position of (Dying destructible))) else do (Do nothing)
-




If (LootTypeRoll Equal to 6) then do (Item - Create MidGradePowerUp[(Random integer number between 0 and MGPU_Highest_Index)] at (Position of (Dying destructible))) else do (Do nothing)
-
-



Else - Actions
-
-
-

