• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] How to change this quest trigger into MUI

Status
Not open for further replies.
Level 3
Joined
Apr 8, 2016
Messages
58
Case:
when 2 player pick the same quest, and the one of them already done the quest first, then the another one's quest become not working. (sorry for my bad english)

Pict
view


1
  • gettingquest1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Quest: Memburu Srigala
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on killcounter1 <gen>

2
  • killcounter1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Unit-type of (Triggering unit)) Equal to Srigala
    • Actions
      • Set pgroup = (Player group((Owner of (Killing unit))))
      • Set kills1[(Player number of (Owner of (Killing unit)))] = (kills1[(Player number of (Owner of (Killing unit)))] + 1)
      • Game - Display to (Player group((Owner of (Killing unit)))) the text: ((String(kills1[(Player number of (Owner of (Killing unit)))])) + (/20 + Srigala telah dibunuh.))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • kills1[(Player number of (Owner of (Killing unit)))] Equal to 20
        • Then - Actions
          • Game - Display to (Player group((Owner of (Killing unit)))) the text: 20 Srigala telah te...
          • Trigger - Turn off (This trigger)
          • Trigger - Turn on reward1 <gen>
        • Else - Actions
      • Custom script: call DestroyForce(udg_pgroup)


3
  • reward1
    • Events
      • Unit - A unit comes within 256.00 of Marley 0118 <gen>
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Game - Display to (Player group((Owner of (Matching unit)))) the text: Imbalan: 400 Exp
      • Hero - Add 400 experience to (Matching unit), Hide level-up graphics
      • Sound - Play QuestCompleted <gen>
      • Set kills1[(Player number of (Owner of (Killing unit)))] = 0
      • Trigger - Turn on gettingquest1 <gen>
 
Level 3
Joined
Apr 8, 2016
Messages
58
hmm.. but the problem is when player1 finished the quest first before player2, the quest for player2 will be stopped..

example:

player1:
20/20 Srigala has been killed (quest complete)

player2:
12/20 Srigala has been killed (not yet)

then when the player2 kill Srigala again, it will not 13/20, but the quest for player2 will be stopped like player1 (but not recive exp reward when player2 comes to NPC)

sorry again for my bad english
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
Have you done what I suggested? Try it first and we'll see if it makes any difference.
The Killing unit in 3rd trigger should also be replaced by Triggering Unit, I forgot to mention it previously.
Try it again in-game. Tell me your result.

Your 3rd trigger is what I suspect the most for being problematic.
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
ah I see your problem. It lies in the 2nd trigger, where you turn off the trigger. You should not turn off the trigger.
Create a boolean variable and set it to true. Put it in the first trigger.
For example:
  • Set bool[(Player number of (Owner of (Triggering unit)))] = true

Create another one in the second trigger. Put it inside the then block this time and set it to false. Ex:
  • Set bool[(Player number of (Owner of (Triggering unit)))] = false

Remove the turn off trigger in 2nd trigger. Hope it works.

To be honest, i prefer to remake that quest system instead of fixing it because it's a lot of trouble. Not to mention the turn on and turn off part. They are such a hassle. But hey, it's probably just me.
Good luck.

Edit:
Create a new boolean variable with different name bool2 for example
set it to false in the 1st trigger
set it to true inside the "then" block in 2nd trigger
create a if then else block in the 3rd trigger then put all the actions in 3rd trigger into the "then" block. make the if then else check the condition "If bool2 equals to true then".

you may now remove all those turn offs and ons in your triggers.
 
Last edited:
Level 3
Joined
Apr 8, 2016
Messages
58
aaa......... no one recived exp when they finished the quest and come to NPC quest

1
  • gettingquest1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Quest: Memburu Srigala
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on killcounter1 <gen>
      • Set bool[(Player number of (Owner of (Triggering unit)))] = True
      • Set bool2[(Player number of (Owner of (Triggering unit)))] = False
2
  • killcounter1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Unit-type of (Triggering unit)) Equal to Srigala
    • Actions
      • Set pgroup = (Player group((Owner of (Killing unit))))
      • Set kills1[(Player number of (Owner of (Killing unit)))] = (kills1[(Player number of (Owner of (Killing unit)))] + 1)
      • Game - Display to (Player group((Owner of (Killing unit)))) the text: ((String(kills1[(Player number of (Owner of (Killing unit)))])) + (/20 + Srigala telah dibunuh.))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • kills1[(Player number of (Owner of (Killing unit)))] Equal to 20
        • Then - Actions
          • Set bool[(Player number of (Owner of (Triggering unit)))] = False
          • Set bool2[(Player number of (Owner of (Triggering unit)))] = True
          • Game - Display to (Player group((Owner of (Killing unit)))) the text: 20 Srigala telah te...
        • Else - Actions
      • Custom script: call DestroyForce(udg_pgroup)
3
  • reward1
    • Events
      • Unit - A unit comes within 256.00 of Marley 0118 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bool2[(Player number of (Owner of (Triggering unit)))] Equal to True
        • Then - Actions
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Imbalan: 400 Exp
          • Hero - Add 400 experience to (Triggering unit), Hide level-up graphics
          • Sound - Play QuestCompleted <gen>
          • Set kills1[(Player number of (Owner of (Triggering unit)))] = 0
        • Else - Actions
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
Try to do it like how I did in my trigger. It works correctly for me.
Just change that Tome of Experience to your Quest Item and Peasant to Marley.
  • Getting Quest
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Tome of Experience
    • Actions
      • Set Bool[(Player number of (Owner of (Triggering unit)))] = True
      • Set Bool2[(Player number of (Owner of (Triggering unit)))] = False
  • KillCounter
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Unit-type of (Triggering unit)) Equal to Timber Wolf
      • Bool[(Player number of (Owner of (Killing unit)))] Equal to True
    • Actions
      • Set PGroup = (Player group((Owner of (Killing unit))))
      • Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Game - Display to PGroup the text: ((String(Kills[(Player number of (Owner of (Killing unit)))])) + (/3 + Srigala telah dibunuh.))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills[(Player number of (Owner of (Killing unit)))] Equal to 3
        • Then - Actions
          • Set Bool[(Player number of (Owner of (Killing unit)))] = False
          • Set Bool2[(Player number of (Owner of (Killing unit)))] = True
          • Game - Display to PGroup the text: 3 Srigala telah ter...
        • Else - Actions
      • Custom script: call DestroyForce(udg_PGroup)
  • Complete
    • Events
      • Unit - A unit comes within 256.00 of Peasant 0008 <gen>
    • Conditions
      • Bool2[(Player number of (Owner of (Triggering unit)))] Equal to True
    • Actions
      • Set PGroup = (Player group((Owner of (Triggering unit))))
      • Game - Display to PGroup the text: Imbalan: 400 Exp
      • Hero - Add 400 experience to (Triggering unit), Hide level-up graphics
      • Set Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • Custom script: call DestroyForce(udg_PGroup)
 
Level 3
Joined
Apr 8, 2016
Messages
58
woww, thx bro.. its work for multiplayer now..

but, i have a new problem.

case:
once the quest done, the quest didn't reset. So, if we go back and forth the NPC, he will keep giving us reward infinitely


edit:
problem solved.

thx for your help broh.. i will give credit of you in my map
and rep+ for you :D
 
Last edited:
Status
Not open for further replies.
Top