• 🏆 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!

User specific quests?

Status
Not open for further replies.
Level 8
Joined
Sep 1, 2009
Messages
124
Hello, sorry but i need some help on making specific user quests. Such as player 1 gains a quest by using an Interact spell on someone, and nobody else gets it. So player one can do the quest, and at any time another player can gain the same quest. It would help a lot.
 
Level 7
Joined
Oct 14, 2008
Messages
340
Localizing quests is dangerous territory I hear, so I'd recommend just creating a custom quest system using variable arrays and such.. It's a lot of work but it's the way to go.
 
There is another path to take. :)
  • Actions
    • Quest - Create a Required quest titled blah with the description asdfj, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
    • Custom script: if GetLocalPlayer() == Player(0) then
    • Quest - Enable (Last created quest)
    • Custom script: endif
Player(0) = Player 1 (Red)
Player(1) = Player 2 (Blue)
Player(2) = Player 3 (Teal)
...
Player (11) = Player 12 (Brown)
 
Level 9
Joined
Apr 25, 2009
Messages
468
Or you try this:
1: Go to variables, create a new variable based on "Player Group"
2: Set the variable to something like (Player Group(Player 1(Red))), this allows you to set players that are in range of the NPC giving you the quest, or players who has a specific item etc.
3: Once it is set, pick the player group (Player Group - Pick every player in <your variable> and do (loop actions))
4: Create the quest.
5: Now create a Custom Script (Custom Script - Destroy PlayerGroup(udg_<your variable))
6: (or you can empty the player group).
7: Done.

Now, why use Player Group?
With this, you can also add special effects etc to the player.
 
Level 7
Joined
Oct 14, 2008
Messages
340
Purge's technique will seem to work at first but again, I'm pretty sure localizing quest information causes desyncs, I guess you can try it but don't say nobody warned you.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Yea I'm thinking the WarCraft engine won't particularly like another player completing a quest that is unavailable to the local player. It may work perfectly though, I don't know. You should test it and get back here with your results.
 
Level 8
Joined
Sep 1, 2009
Messages
124
ugh, well Hanibon's does not work, i can tell you that. And i cant test purgeand's either because i don't know any custom script. so no, none of them work. Any other ideas or am i going to have to (painfully) make a variable system thats going to take up a lot of processor space for quests?
 
I can't test it at the moment. D:

But, try this:
  • Actions
    • Quest - Create a Required quest titled Blah with the description gjksfd, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
    • Custom script: call QuestSetEnabled(bj_lastCreatedQuest,GetLocalPlayer()==Player(0))
A little shorter, and I doubt it'll desync. Here is how to set up a custom script:
Open up actions and then follow these pics: =D
View attachment 75194

View attachment 75195

View attachment 75196

Only adjust the number highlighted in the last picture. Player(5) is player 6 I believe. So choose your player, subtract 1 from the number, and put that number in the highlighted area and you're set. =D

If you need it for multiple players, you'd have to use "or" in the boolean and add GetLocalPlayer() == Player(#) for each player. It would look a little sloppy and long but at least it'd work. =P
 
Last edited:
Status
Not open for further replies.
Top