- Joined
- Feb 1, 2009
- Messages
- 111
Background: This is a simple quest system that I need help with. It doesn't work at all in multiplayer.
What is supposed to happen: When a player clicks on the npc it gives him/her a quest to kill 10 Satyrs. Any other player that is within 800 range who hasnt done the quest will get the quest automatically. Unfortunately this doesnt happen in-game.
How do I fix it?
Trigger 1:
What is supposed to happen: When a player clicks on the npc it gives him/her a quest to kill 10 Satyrs. Any other player that is within 800 range who hasnt done the quest will get the quest automatically. Unfortunately this doesnt happen in-game.
How do I fix it?
Trigger 1:
-
Theodus Satyr Quest 1 Remake
-
Events
- Player - Player 1 (Red) Selects a unit
- Player - Player 2 (Blue) Selects a unit
- Player - Player 3 (Teal) Selects a unit
- Player - Player 4 (Purple) Selects a unit
- Player - Player 5 (Yellow) Selects a unit
- Player - Player 6 (Orange) Selects a unit
- Player - Player 7 (Green) Selects a unit
- Player - Player 8 (Pink) Selects a unit
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Theodus
- HasSatyrQuest[(Player number of (Triggering player))] Equal to False
-
Conditions
-
And - All (Conditions) are true
-
Actions
- Set PositionofTheodus = (Position of Theodus 0108 <gen>)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 800.00 of (Position of Theodus 0108 <gen>) matching (((Owner of (Matching unit)) Not equal to Neutral Hostile) and (((Unit-type of (Matching unit)) Not equal to Backpack) and ((Owner of (Matching unit)) Not equal to Player 11 (Dark Green))))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HasSatyrQuest[(Player number of (Owner of (Picked unit)))] Equal to False
-
Then - Actions
- Unit Group - Add (Picked unit) to KillSatyrs_PlayerGroup[QuestGroup[1]]
- Sound - Play QuestNew <gen>
- Quest - Display to (Player group((Owner of (Picked unit)))) the Quest Update message: New Quest Added: In...
- Quest - Display to (Player group((Owner of (Picked unit)))) the Quest Update message: Help us please! Th...
- Set HasSatyrQuest[(Player number of (Owner of (Picked unit)))] = True
- Quest - Create a Optional quest titled Invasion of Satyrs with the description Satyrs have invaded..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Set Quest1[(Player number of (Owner of (Picked unit)))] = (Last created quest)
- Trigger - Turn on Kill10 Satyrs <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set QuestGroup[1] = (QuestGroup[1] + 1)
- Custom script: call RemoveLocation(udg_PositionofTheodus)
-
Events
-
Kill10 Satyrs
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Dying unit)) Equal to Satyr
- (Owner of (Killing unit)) Not equal to Player 11 (Dark Green)
-
Actions
- Set KillingUnit = (Killing unit)
-
For each (Integer A) from 0 to QuestGroup[1], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (KillingUnit is in KillSatyrs_PlayerGroup[(Integer A)]) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SatyrKills[(Integer A)] Less than 10
-
Then - Actions
- Set SatyrKills[(Integer A)] = (SatyrKills[(Integer A)] + 1)
-
Unit Group - Pick every unit in KillSatyrs_PlayerGroup[(Integer A)] and do (Actions)
-
Loop - Actions
- Game - Display to (Player group((Owner of (Picked unit)))) the text: (Satyrs Killed: + ((String(SatyrKills[(Integer A)])) + / 10))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SatyrKills[(Integer A)] Equal to 10
-
Then - Actions
- Quest - Display to (Player group((Owner of (Picked unit)))) the Quest Update message: You have shown your...
- Quest - Mark Quest1[(Player number of (Owner of (Picked unit)))] as Completed
- Hero - Add 250 experience to (Picked unit), Hide level-up graphics
- Quest - Display to (Player group((Owner of (Picked unit)))) the Quest Update message: You have received |...
- Sound - Play GoodJob <gen>
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Else - Actions
-
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)
-
Loop - Actions
-
Events
Last edited: