Enable a quest to only specific players

meehael

New Member
Reaction score
6
Enable a quest only to specific players

Hi all,

I was wondering if I can enable a quest (so that it is visible in the Quest Log) only to the player who discovered it? What I found out is that if one player discovers a quest, it will be enabled and discovered to all players (even the enemy), which doesn't make sense in my map and isn't the desired behavior.

Will later marking the quest as "completed" work again in the same way mentioned above (marked as "completed" to only the player who completed it)?

Thanks,
Regards!
 

Azlier

Old World Ghost
Reaction score
461
You can only bump once every 24 hours.

Something like this?
Trigger:
  • Teehee
    • Events
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == udg_MyPlayerVar then
      • Quest - Disable (Last created quest)
      • Custom script: endif
 

meehael

New Member
Reaction score
6
I'm sorry.

What would be Last created quest? And what about creating a quest?

Thanks for the help so far :)
 

wraithseeker

Tired.
Reaction score
122
The quest is which quest you want, normally you would set each quest to a variable.

You just create them using GUI create quest.
 

meehael

New Member
Reaction score
6
The code above doesn't work for me. I created a quest and it was created for all players, and in addition the players got disconnected after that. :confused:
 

LoveTD's

New Member
Reaction score
34
have you used the exact same code? because you are supposed to use your own variable in the udg_MyPlayerVar part :)

or you can do it like this: if GetLocalPlayer() == Player(0) then


(player(0) = player 1, player(1)= player 2 etc....)
 

meehael

New Member
Reaction score
6
Well, I made a new map from scratch containing only these five triggers:

Trigger:
  • Trigger 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set P1 = Player 1 (Red)
      • Set P2 = Player 2 (Blue)

Trigger:
  • Trigger 2
    • Events
      • Unit - A unit enters QuestStart <gen>
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == udg_P1 then
      • Quest - Create a Required quest titled Test with the description Some text, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set Q1 = (Last created quest)
      • Custom script: endif

Trigger:
  • Trigger 3
    • Events
      • Unit - A unit enters QuestEnd <gen>
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == udg_P1 then
      • Quest - Mark Q1 as Completed
      • Custom script: endif

Trigger:
  • Trigger 4
    • Events
      • Unit - A unit enters QuestStart <gen>
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == udg_P2 then
      • Quest - Create a Required quest titled Test with the description Some text, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set Q1 = (Last created quest)
      • Quest - Mark Q1 as Discovered
      • Custom script: endif

Trigger:
  • Trigger 5
    • Events
      • Unit - A unit enters QuestEnd <gen>
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == udg_P2 then
      • Quest - Mark Q1 as Completed
      • Custom script: endif

But, when I got the quest, the other player also got it and he got disconnected, in addition.
 
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