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

Giving quest to a single player

Status
Not open for further replies.
Level 13
Joined
Feb 18, 2009
Messages
1,381
Hi.
I am making a map, as you can see everywhere, and i will make tons of quests, i just have a problem, the quest is given to ALL players. Is it possible to give it to (Owner of unit (triggering unit))?
 
I will try to make a non-desync-able way, although it's not tested, so try this out. I will actually make the string name local, not the quest itself, so

  • Set Q_Name = Quest Title
  • Set Q_Description = Quest Description
  • Set Q_IconPath = ReplaceableTextures\CommandButtons\BTNAmbush.blp
  • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit())
  • Set Q_Name = <Empty String>
  • Set Q_Description = <Empty String>
  • Set Q_IconPath = <Empty String>
  • Custom script: endif
  • Quest - Create a Required quest titled Q_Name with the description Q_Description, using icon path Q_IconPath
For the "<Empty string>", just press Enter (=type nothing).
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
I will try to make a non-desync-able way, although it's not tested, so try this out. I will actually make the string name local, not the quest itself, so

  • Set Q_Name = Quest Title
  • Set Q_Description = Quest Description
  • Set Q_IconPath = ReplaceableTextures\CommandButtons\BTNAmbush.blp
  • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit())
  • Set Q_Name = <Empty String>
  • Set Q_Description = <Empty String>
  • Set Q_IconPath = <Empty String>
  • Custom script: endif
  • Quest - Create a Required quest titled Q_Name with the description Q_Description, using icon path Q_IconPath
For the "<Empty string>", just press Enter (=type nothing).

Thanks for quick answer. Will test it now, although i understand nearly nothing.
Is Q_Name a real, integer or is there a Quest variable?
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
Testing now. Result :
I am unable to open map.
Trigger :
  • Starting the quest
    • Events
      • Unit - A unit comes within 300.00 of Flight Master Amish Wildhammer 0133 <gen>
    • Conditions
    • Actions
      • Camera - Apply Amish Cam <gen> for (Owner of (Triggering unit)) over 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Cinematic - Turn cinematic mode On for Player Group - Player 1 (Red)
          • Cinematic - Send transmission to Player Group - Player 1 (Red) from Flight Master Amish Wildhammer 0133 <gen> named Amish Wildhammer: Play No sound and display Hello. I see you fo.... Modify duration: Add 0.00 seconds and Wait
          • Cinematic - Send transmission to Player Group - Player 1 (Red) from Flight Master Amish Wildhammer 0133 <gen> named Amish Wildhammer: Play No sound and display Well, as you see, i.... Modify duration: Add 0.00 seconds and Wait
          • Cinematic - Send transmission to Player Group - Player 1 (Red) from Flight Master Amish Wildhammer 0133 <gen> named Amish Wildhammer: Play No sound and display Could you please de.... Modify duration: Add 0.00 seconds and Wait
          • Wait 2.00 seconds
          • Cinematic - Turn cinematic mode Off for (All players)
          • Camera - Reset camera for Player 1 (Red) to standard game-view over 0.00 seconds
          • Special Effect - Destroy AmishExclamationMark
          • Set Q_Name = Journey to Honor Hold
          • Set Q_Description = Travel to Honor Hold and deliver Durons Report to Marshal Isildor
          • Set Q_IconPath = ReplaceableTextures\CommandButtons\BTNTomeOfRetraining.blp
          • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit())
          • Set Q_Name = <Empty String>
          • Set Q_Description = <Empty String>
          • Set Q_IconPath = <Empty String>
          • Custom script: endif
          • Quest - Create a Optional quest titled Q_Name with the description Q_Description, using icon path Q_IconPath
          • Item - Create Durons Report at (Center of Human flightpoint 1 <gen>)
          • Set DuronsReport = (Last created item)
          • Hero - Give DuronsReport to (Triggering unit)
          • Trigger - Turn off (This trigger)
        • Else - Actions
Screeny :
 

Attachments

  • Lawl.PNG
    Lawl.PNG
    268 KB · Views: 71
Level 13
Joined
Feb 18, 2009
Messages
1,381
Ahhh haha.
Well, tested, and the quest did in fact show up BUT, with a green icon, no title, or description, but it is a start :p

I thougth myself that i should change empty string to my things?
 
Hm, Use this:
  • Quest - Create a Optional quest titled Journey to Honor Hold with the description Travel to Honor Hold and deliver Durons Report to Marshal Isildor, using icon path ReplaceableTextures\CommandButtons\BTNTomeOfRetraining.blp
  • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
  • Quest - Enable (Last created quest)
  • Custom script: endif
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
OK.
Just a thing i thought.
The special effect. That is removed during the trigger. Is it possible to remove THAT for the player itself.
And i now understand that it is the Custom Script that is the trigger, not the Quest - Blabla
And in the end it is turned off. Is that for one or all players?
 
OK.
Just a thing i thought.
The special effect. That is removed during the trigger. Is it possible to remove THAT for the player itself.
And i now understand that it is the Custom Script that is the trigger, not the Quest - Blabla
And in the end it is turned off. Is that for one or all players?

A special effect? Well, you can't destroy handles for players due to desyncs.

You can "kind of" do it by creating the effects locally:
http://www.hiveworkshop.com/forums/1526792-post9.html

And then just destroying them normally.

For the second part, if the quest is disabled at the end it will disable it for everyone unless you do something like:
  • Custom Script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
  • Quest - Disable (Last Created Quest)
  • Custom Script: endif
Just be careful with these blocks. They are very prone to desyncs, but you can avoid most if not all of the problems if you thoroughly read this thread:
http://www.thehelper.net/forums/showthread.php?t=89207

I updated it recently for 1.24 (when they fixed the return bug and added GetHandleId()) as well as fixing some confusing stuff.
 
  • Custom script: call DisableTrigger (GetTriggeringTrigger())
A simple Trigger - Turn off (This trigger) is the same thing though.

You can also
  • Custom script: call DestroyTrigger (GetTriggeringTrigger())
The first one will "Disable" it, while you can still enable it via
  • Custom script: call EnableTrigger (gg_trg_TriggerName)
, while the second one will permanently destroy it.
 
Level 8
Joined
Apr 8, 2009
Messages
499
Could Anyone Explain to me how this actually works?

for example, how do you Acquire the quest with these triggers? or do you need seperate triggers for that?

(sorry, im just a basic triggerer, and desperately need help with induvidual quests)
 
Status
Not open for further replies.
Top