• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Individual Quest Interface for each player?

Status
Not open for further replies.
Level 30
Joined
Jul 23, 2009
Messages
1,033
Another thing I noticed I have never needed to know before but now it bugs me that I really have no clue about it.

When you play Gaias Retaliation you have your own quest progress and such. However the only option I can find when making a quest is to make quests that all players share. Can someone help me please?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
You can place "GetLocalPlayer()" on Google or in the Search option here in Hive Forums. IT's a function used to do things for one player only; but there are some risks using it since it may cause desync (all players disconnect) if not used properly. There's a tutorial called "Things a GUI user Should know" that talks a bit about it. I think you can find some usefull information in the Tutorial section of Hiveworkshop.
 
You can check out one tutorial on it here:
http://www.thehelper.net/threads/jass-getlocalplayer.77369/
It was a bit outdated before (since I made it 5 years ago) but I recently updated it.

As far as having your own quest progress, you would use the functions that manage whether a quest is discovered and completed. Here is an example:
  • Set TempPlayer = Player 1 (Red)
  • Custom script: if GetLocalPlayer() == udg_TempPlayer then
  • Quest - Mark <Quest> as Completed
  • Custom script: endif
That would mark the quest completed only for player 1 (red). You can adjust the player to whomever you'd like.

The only issue is that certain things can become complicated. For example, let's say you open a gate when a quest is completed, but only player 1 (red) completed the quest. If you fire the trigger right after the quest is completed, and only player 1 (red) completed it (locally), then the gate would only open for him. This has more significance than what you'd expect. Player 1 would see the gate as open but the other players wouldn't. If player 1 runs through it, he'll only see himself running through the gate. All the other players will be thinking, "Wtf, this nub is running into a gate". This is a simple example of a desynchronization, and Blizzard's response is to kick (disconnect) the players.

You just have to be careful in planning. It is perfectly possible to do this and make it all 100% synced (like in Gaia's), but you just have to be sure that there aren't any odd loopholes.

Another thing to worry about is what you put in the GetLocalPlayer() blocks. As you can see in my tutorial, certain things will trigger a desync (such as creating a handle, e.g. a quest), so you want to avoid that. This is a lot easier to do in JASS, but sometimes a bit difficult in GUI since there are a lot of hidden aspects to the GUI functions. The key to solving this problem is to just test often. If you encounter a desync, just post it on the forums and we can help out. Look into kLoader to run tests by yourself:
http://www.hiveworkshop.com/forums/...multiple-warcraft-3-running-single-pc-226287/

Good luck! If you need any more info, just ask. I would be happy to give more examples as well.
 
Status
Not open for further replies.
Top