Hello, I have made an RPG with a bunch of units in at map initialization. I believe it is too much for the pc to handle a Unit Group - Pick all units in playable map area.
But I have several triggers and some just crashes, while others don't.
Trigger 1: crashes
This somehow does not crash the game.)
What is the difference? What makes the 1. trigger crash the game, while the 2. trigger works fine?
But I have several triggers and some just crashes, while others don't.
Trigger 1: crashes
-
Backpack drops an item
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Backpack
-
-
Actions
-
Set A_Caster = (Hero manipulating item)
-
Set A_Counter = 0
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
Set A_All_Units = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of A_All_Units) Not equal to Player 12 (Brown)
-
(Owner of A_All_Units) Not equal to Neutral Passive
-
(Owner of A_All_Units) Equal to (Owner of A_Caster)
-
A_All_Units Not equal to A_Caster
-
(A_All_Units is A Hero) Equal to True
-
-
Then - Actions
-
Set A_Point = (Position of A_All_Units)
-
Item - Move (Item being manipulated) to A_Point
-
Custom script: call RemoveLocation (udg_A_Point)
-
Set A_Counter = (A_Counter + 1)
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
A_Counter Equal to 0
-
-
Then - Actions
-
Item - Move (Item being manipulated) to (Position of A_Caster)
-
-
Else - Actions
-
-
-
-
Backpack skills up
-
Events
-
Unit - A unit Learns a skill
-
-
Conditions
-
(Unit-type of (Learning Hero)) Equal to Backpack
-
Or - Any (Conditions) are true
-
Conditions
-
(Learned Hero Skill) Equal to Attribute Bonus: Ability Power
-
(Learned Hero Skill) Equal to Attribute Bonus: Dexterity
-
(Learned Hero Skill) Equal to Attribute Bonus: Endurance
-
(Learned Hero Skill) Equal to Attribute Bonus: Knowledge
-
-
-
-
Actions
-
Set A_Caster = (Learning Hero)
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
Set A_All_Units = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of A_All_Units) Not equal to Player 12 (Brown)
-
(Owner of A_All_Units) Not equal to Neutral Passive
-
(A_All_Units is A Hero) Equal to True
-
(Unit-type of A_All_Units) Not equal to Backpack
-
-
Then - Actions
-
Set A_SingleTarget = A_All_Units
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Learned Hero Skill) Equal to Attribute Bonus: Ability Power
-
-
Then - Actions
-
Unit - Set level of Attribute Bonus: Ability Power for (Learning Hero) to 1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Hero_AP_Skillup[(Player number of (Owner of A_SingleTarget))] Less than 99
-
-
Then - Actions
-
Set Player_Hero_AP_Skillup[(Player number of (Owner of A_SingleTarget))] = (Player_Hero_AP_Skillup[(Player number of (Owner of A_SingleTarget))] + 1)
-
Hero - Create Skill Up: Ability Power and give it to A_SingleTarget
-
-
Else - Actions
-
Game - Display to (Player group((Owner of A_SingleTarget))) the text: |cffff0000Maximum v...
-
Hero - Modify unspent skill points of A_Caster: Add 1 points
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Learned Hero Skill) Equal to Attribute Bonus: Dexterity
-
-
Then - Actions
-
Unit - Set level of Attribute Bonus: Dexterity for (Learning Hero) to 1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Agility of A_SingleTarget (Exclude bonuses)) Less than 99
-
-
Then - Actions
-
Hero - Create Tome of Agility and give it to A_SingleTarget
-
-
Else - Actions
-
Game - Display to (Player group((Owner of A_SingleTarget))) the text: |cffff0000Maximum v...
-
Hero - Modify unspent skill points of A_Caster: Add 1 points
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Learned Hero Skill) Equal to Attribute Bonus: Endurance
-
-
Then - Actions
-
Unit - Set level of Attribute Bonus: Endurance for (Learning Hero) to 1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Strength of A_SingleTarget (Exclude bonuses)) Less than 99
-
-
Then - Actions
-
Hero - Create Skill Up: Endurance and give it to A_SingleTarget
-
-
Else - Actions
-
Game - Display to (Player group((Owner of A_SingleTarget))) the text: |cffff0000Maximum v...
-
Hero - Modify unspent skill points of A_Caster: Add 1 points
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Learned Hero Skill) Equal to Attribute Bonus: Knowledge
-
-
Then - Actions
-
Unit - Set level of Attribute Bonus: Knowledge for (Learning Hero) to 1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Intelligence of A_SingleTarget (Exclude bonuses)) Less than 99
-
-
Then - Actions
-
Hero - Create Skill Up: Knowledge and give it to A_SingleTarget
-
-
Else - Actions
-
Game - Display to (Player group((Owner of A_SingleTarget))) the text: |cffff0000Maximum v...
-
Hero - Modify unspent skill points of A_Caster: Add 1 points
-
-
-
-
Else - Actions
-
-
-
This somehow does not crash the game.)
What is the difference? What makes the 1. trigger crash the game, while the 2. trigger works fine?
Last edited: