Quest Reward Trigger

jarekpl12

TH.net Regular
Reaction score
6
Hello. I got problem with my trigger. I made map where is some quest. The problem is with reward. When quest is complete and any hero will come to Bob (quest giver) then all heroes get +1 skill point to use. In actions i made it as ,,Random unit from units owned by Player 1 (Red), Player 2 (Blue)... There is a small bug. When some player will summon any other unit non-hero kind, there is certain chance to let this non-hero unit get this +1 skill point, it makes nothing cuz units can't get additional points to abilities. Can somone tell me how to make better trigger (new) or fix this?... Thx





Trigger Name: BOB QUEST REWARD
EVENTS:
Unit - A unit enters Region 018 <gen>
CONDITIONS:
((Triggering unit) is Bohater) = YES
(Life of Ghul (quest) 0083 <gen>) Lower or Equal 0.00
(Life of Ghul (quest) 0113 <gen>) Lower or Equal 0.00
(Life of Ghul (quest) 0114 <gen>) Lower or Equal 0.00
(Life of Ghul (quest) 0115 <gen>) Lower or Equal 0.00
(Life of Ghul (quest) 0112 <gen>) Lower or Equal 0.00
(Life of Ghul (quest) 0116 <gen>) Lower or Equal 0.00
ACTIONS:
Quest - Mark (Last created quest) as Done

Sound - Play QuestCompleted <gen>

Hero - Modify unspent skill points of (Random unit from (Units owned by Player 1 (Red) matching (((Triggering unit) is Hero) = YES))): Add 1 points
Hero - Modify unspent skill points of (Random unit from (Units owned by Player 2 (Blue) matching (((Triggering unit) is Hero) = YES))): Add 1 points
Hero - Modify unspent skill points of (Random unit from (Units owned by Player 6 (Orange) matching (((Triggering unit) is Hero) = YES))): Add 1 points
Hero - Modify unspent skill points of (Random unit from (Units owned by Player 5 (Yellow) matching (((Triggering unit) is Hero) = YES))): Add 1 points
Hero - Modify unspent skill points of (Random unit from (Units owned by Player 7 (Green) matching (((Triggering unit) is Hero) = YES))): Add 1 points
Hero - Modify unspent skill points of (Random unit from (Units owned by Player 4 (Purple) matching (((Triggering unit) is Hero) = YES))): Add 1 points


Gra - Display to (All players) the text: |cff8B4513Bob:|r T...

Trigger - Turn off Bob Quest <gen>

Trigger - Turn off Bob Quest reward <gen>
 
Here's your mistake

Code:
Hero - Modify unspent skill points of (Random unit from (Units owned by Player 1 (Red) matching ((([B]Triggering unit[/B]) is Hero) = YES))): Add 1 points

Should be,

Code:
Hero - Modify unspent skill points of (Random unit from (Units owned by Player 1 (Red) matching ((([B]Matching unit[/B]) is Hero) = YES))): Add 1 points
 
I think you should create a "hero_group" with all your player heroes.

I suppose that a player can choose between different heroes, so when a player select the hero, add that unit to "hero_group" (unit group variable).

So all you need to rewards is:

"pick every unit in "hero_group" and add 1 skill point to picked unit"

Hints:
-Remove hero from "hero_group" for leaving players
-You can create a Condition for all you quest triggers: [entering/triggering/leaving (whatever) unit is in "hero_group"] so only player heroes can activate those triggers (no non-hero units)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top