- Joined
- Apr 14, 2012
- Messages
- 2,901
Hello everyone!
My current project had a lot of bugs in t he past, but I have managed to fix a majority of them. But this particular trigger is the one I don't understand.
Basically it's a trigger that counts how many units of a particular unit-type the hero has killed, and when those kills reach a certain number, the hero is to be given an item and the player should be be notified with a Quest Update.
The weird thing is, when the hero has killed the sufficient number of creeps, the Quest Update text is shown but the item is neither created nor given to the hero.
Please help me fix this problem.
I will give credits to those that help me, and of course some rep as appreciation =)
SOLVED!
My current project had a lot of bugs in t he past, but I have managed to fix a majority of them. But this particular trigger is the one I don't understand.
Basically it's a trigger that counts how many units of a particular unit-type the hero has killed, and when those kills reach a certain number, the hero is to be given an item and the player should be be notified with a Quest Update.
The weird thing is, when the hero has killed the sufficient number of creeps, the Quest Update text is shown but the item is neither created nor given to the hero.
Please help me fix this problem.
-
Unit Kill
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
- Set Hero = (Killing unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- QuestOnBoolean[1] Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Creep_Counter[1] Greater than or equal to 5) and ((Creep_Counter[2] Greater than or equal to 3) and (Creep_Counter[3] Greater than or equal to 2))
-
Then - Actions
- Set Temp_Point = (Position of (Triggering unit))
- Item - Create Quest Note at Temp_Point
- Set Quest_Note = (Last created item)
- Hero - Give Quest_Note to Hero
- Custom script: call RemoveLocation(udg_Temp_Point)
- Quest - Display to (All players) the Quest Completed message: Requirements met! G...
- Trigger - Turn off (This trigger)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Triggering unit)) Equal to C_Wolf
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Creep_Counter[1] Less than 4
-
Then - Actions
- Set Creep_Counter[1] = (Creep_Counter[1] + 1)
- Quest - Change the description of Quest_Requirement[9] to (Killed Forest Wolves: + ((String(Creep_Counter[1])) + /5))
- Game - Display to (All players) the text: (You have killed + ((String(Creep_Counter[1])) + Wolf(ves)!))
-
Else - Actions
- Set Creep_Counter[1] = (Creep_Counter[1] + 1)
- Quest - Mark Quest_Requirement[9] as Completed
- Quest - Change the description of Quest_Requirement[9] to (Killed Forest Wolves: + 5/5)
- Game - Display to (All players) the text: (You have killed + ((String(Creep_Counter[1])) + Wolf(ves)!))
-
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
- (Unit-type of (Triggering unit)) Equal to C_GiantWolf
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Creep_Counter[2] Less than 2
-
Then - Actions
- Set Creep_Counter[2] = (Creep_Counter[2] + 1)
- Quest - Change the description of Quest_Requirement[10] to (Killed Giant Forest Wolves: + ((String(Creep_Counter[2])) + /3))
- Game - Display to (All players) the text: (You have killed + ((String(Creep_Counter[2])) + Giant Wolf(ves)!))
-
Else - Actions
- Set Creep_Counter[2] = (Creep_Counter[2] + 1)
- Quest - Mark Quest_Requirement[10] as Completed
- Quest - Change the description of Quest_Requirement[10] to (Killed Giant Forest Wolves: + 3/3)
- Game - Display to (All players) the text: (You have killed + ((String(Creep_Counter[2])) + Giant Wolf(ves)!))
-
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
- (Unit-type of (Triggering unit)) Equal to C_ForestBear
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Creep_Counter[3] Less than 1
-
Then - Actions
- Set Creep_Counter[3] = (Creep_Counter[3] + 1)
- Quest - Change the description of Quest_Requirement[11] to (Killed Forest Bears: + ((String(Creep_Counter[3])) + /2))
- Game - Display to (All players) the text: (You have killed + ((String(Creep_Counter[3])) + Forest Bear(s) !))
-
Else - Actions
- Set Creep_Counter[3] = (Creep_Counter[3] + 1)
- Quest - Mark Quest_Requirement[11] as Completed
- Quest - Change the description of Quest_Requirement[11] to (Killed Giant Forest Wolves: + 2/2)
- Game - Display to (All players) the text: (You have killed + ((String(Creep_Counter[3])) + Forest Bear(s) !))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Events
I will give credits to those that help me, and of course some rep as appreciation =)
SOLVED!
Last edited: