N
Navazrayel
Guest
Okay. Here I go thinking I'm really clever. Mistake number 1.
I was trying to make a system that drops an item based off an item table. I tried setting up so a unit called "reward" had the table. when a unit was killed, unless it was one of the reward units, the reward unit was killed, effectively activating the item-table. 2 problems presents itself....
I cant seem to get the game to determine the killing player, and I cant seem to ressurrect the "reward" so it can be killed again, with the item table.
posting code :
Reward
Events
Unit - A unit Dies
Conditions
(Triggering unit) Not equal to Reward 1 0020 <gen>
(Triggering unit) Not equal to Reward 2 0024 <gen>
(Triggering unit) Not equal to Reward 3 0025 <gen>
(Triggering unit) Not equal to Reward 4 0026 <gen>
(Triggering unit) Not equal to Reward 5 0027 <gen>
(Triggering unit) Not equal to Reward 1 0021 <gen>
(Triggering unit) Not equal to Reward 2 0028 <gen>
(Triggering unit) Not equal to Reward 3 0031 <gen>
(Triggering unit) Not equal to Reward 4 0034 <gen>
(Triggering unit) Not equal to Reward 5 0037 <gen>
(Triggering unit) Not equal to Reward 1 0022 <gen>
(Triggering unit) Not equal to Reward 2 0029 <gen>
(Triggering unit) Not equal to Reward 3 0032 <gen>
(Triggering unit) Not equal to Reward 4 0035 <gen>
(Triggering unit) Not equal to Reward 5 0038 <gen>
(Triggering unit) Not equal to Reward 1 0023 <gen>
(Triggering unit) Not equal to Reward 2 0030 <gen>
(Triggering unit) Not equal to Reward 3 0033 <gen>
(Triggering unit) Not equal to Reward 4 0036 <gen>
(Triggering unit) Not equal to Reward 5 0039 <gen>
Actions
Set Killingunit = (Damage source) <----- this wont work.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of Killingunit) Equal to Player 2 (Blue)
Then - Actions
Set Killingunitowner = Player 2 (Blue)
Set Killingunitownerregion = Blue reward area <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Blue reward area <gen> contains (Position of No item)) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) Current lumber) Equal to (Min(0, 100))
Then - Actions
Unit - Kill Reward 1 0020 <gen>
Unit - Create 1 Reward 1 for Neutral Passive at (Random point in Killingunitownerregion) facing Default building facing degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) Current lumber) Equal to (Min(101, 200))
Then - Actions
Else - Actions
Else - Actions
Do nothing
Else - Actions
Hope my english is to your approval.<----- this part will not work due to event response
I was trying to make a system that drops an item based off an item table. I tried setting up so a unit called "reward" had the table. when a unit was killed, unless it was one of the reward units, the reward unit was killed, effectively activating the item-table. 2 problems presents itself....
I cant seem to get the game to determine the killing player, and I cant seem to ressurrect the "reward" so it can be killed again, with the item table.
posting code :
Reward
Events
Unit - A unit Dies
Conditions
(Triggering unit) Not equal to Reward 1 0020 <gen>
(Triggering unit) Not equal to Reward 2 0024 <gen>
(Triggering unit) Not equal to Reward 3 0025 <gen>
(Triggering unit) Not equal to Reward 4 0026 <gen>
(Triggering unit) Not equal to Reward 5 0027 <gen>
(Triggering unit) Not equal to Reward 1 0021 <gen>
(Triggering unit) Not equal to Reward 2 0028 <gen>
(Triggering unit) Not equal to Reward 3 0031 <gen>
(Triggering unit) Not equal to Reward 4 0034 <gen>
(Triggering unit) Not equal to Reward 5 0037 <gen>
(Triggering unit) Not equal to Reward 1 0022 <gen>
(Triggering unit) Not equal to Reward 2 0029 <gen>
(Triggering unit) Not equal to Reward 3 0032 <gen>
(Triggering unit) Not equal to Reward 4 0035 <gen>
(Triggering unit) Not equal to Reward 5 0038 <gen>
(Triggering unit) Not equal to Reward 1 0023 <gen>
(Triggering unit) Not equal to Reward 2 0030 <gen>
(Triggering unit) Not equal to Reward 3 0033 <gen>
(Triggering unit) Not equal to Reward 4 0036 <gen>
(Triggering unit) Not equal to Reward 5 0039 <gen>
Actions
Set Killingunit = (Damage source) <----- this wont work.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of Killingunit) Equal to Player 2 (Blue)
Then - Actions
Set Killingunitowner = Player 2 (Blue)
Set Killingunitownerregion = Blue reward area <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Blue reward area <gen> contains (Position of No item)) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) Current lumber) Equal to (Min(0, 100))
Then - Actions
Unit - Kill Reward 1 0020 <gen>
Unit - Create 1 Reward 1 for Neutral Passive at (Random point in Killingunitownerregion) facing Default building facing degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) Current lumber) Equal to (Min(101, 200))
Then - Actions
Else - Actions
Else - Actions
Do nothing
Else - Actions
Hope my english is to your approval.<----- this part will not work due to event response


