• 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.

[Trigger] Item quest help

Status
Not open for further replies.
Level 5
Joined
Sep 12, 2009
Messages
82
Ok so i got warcraft 3 frozen throne and i need help with item quest, so when i get 4 items quest need to be completed, but i cannot do that
Here is what i done:

  • Shimering portal part 2 completition
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Shimering portal parts
    • Actions
      • Set ShimeringPortalParts[(Player number of (Owner of (Item being manipulated)))] = ((Player number of (Owner of (Item being manipulated))) + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShimeringPortalParts[(Player number of (Owner of (Item being manipulated)))] Equal to 4
        • Then - Actions
          • Quest - Display to (All players) the Quest Update message: |cff995500(Part 2 o...
          • Quest - Mark ShimeringPortalQuest[2] as Completed
          • Player - Add 3 to (Matching player) Current lumber
          • Hero - Add 20 experience to (Triggering unit), Show level-up graphics
        • Else - Actions
          • Do nothing
 
  • Do nothing
is only needed for if/then/else single action. It's wasteful to place it on an if/then/else multiple actions.

(Player number of (Owner of (Item being manipulated)))

This can be shortened to:

(Player number of (Triggering Player))

You can use "Triggering Player" for "generic unit event" almost every time to retrieve the player who owns the Triggering Unit.

  • Set ShimeringPortalParts[(Player number of (Owner of (Item being manipulated)))] = ((Player number of (Owner of (Item being manipulated))) + 1)
This needs to be:

  • Set ShimeringPortalParts[(Player number of (Triggering Player))] = ShimeringPortalParts[(Player number of (Triggering Player))] + 1
You weren't adding "Shimmering Portal Parts" by itself, causing the main problem.

  • Player - Add 3 to (Matching player) Current lumber
"Matching Player" is not valid here, causing another problem. You need to use Triggering Player.
 
Level 5
Joined
Sep 12, 2009
Messages
82
  • Do nothing
is only needed for if/then/else single action. It's wasteful to place it on an if/then/else multiple actions.

(Player number of (Owner of (Item being manipulated)))

This can be shortened to:

(Player number of (Triggering Player))

You can use "Triggering Player" for "generic unit event" almost every time to retrieve the player who owns the Triggering Unit.

  • Set ShimeringPortalParts[(Player number of (Owner of (Item being manipulated)))] = ((Player number of (Owner of (Item being manipulated))) + 1)
This needs to be:

  • Set ShimeringPortalParts[(Player number of (Triggering Player))] = ShimeringPortalParts[(Player number of (Triggering Player))] + 1
You weren't adding "Shimmering Portal Parts" by itself, causing the main problem.

  • Player - Add 3 to (Matching player) Current lumber
"Matching Player" is not valid here, causing another problem. You need to use Triggering Player.

Thank you very much for your reply, ill check it out now!
 
Level 5
Joined
Sep 12, 2009
Messages
82
Nope not working here is my trigger you said to be fixed, i got all 4 items in my inventory but it does not say quest completed.

  • Shimering portal part 2 completition
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Shimering portal parts
    • Actions
      • Set ShimeringPortalParts[(Player number of (Triggering player))] = ((Player number of (Triggering player)) + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShimeringPortalParts[(Player number of (Owner of (Item being manipulated)))] Equal to 4
        • Then - Actions
          • Quest - Display to (All players) the Quest Update message: |cff995500(Part 2 o...
          • Quest - Mark ShimeringPortalQuest[2] as Completed
          • Player - Add 3 to (Triggering player) Current lumber
          • Hero - Add 20 experience to (Triggering unit), Show level-up graphics
        • Else - Actions
          • Trigger - Turn off (This trigger)
 
Level 5
Joined
Sep 12, 2009
Messages
82
Oh dear i don't know how to do it, here is screenshot i cannot find shimeringportalparts to be on first place like here
  • Set ShimeringPortalParts[(Player number of (Triggering player))] = ShimeringPortalParts[((Player number of (Triggering player)))]+1
 

Attachments

  • ,,,.jpg
    ,,,.jpg
    172.3 KB · Views: 91
You need to select:

1. Math
2. Arithmatic
3. first box: ShimmeringPortalParts[PlayerNumber of TriggeringPlayer]
4. delimeter: Plus-sign
5. second box: 1.

Seriously this would be way logical in JASS because you only have to type it instead of select through that ridiculous tree.

JASS:
set udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())] = udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())] + 1
 
Level 5
Joined
Sep 12, 2009
Messages
82
  • Shimering portal part 2 completition
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Shimering portal parts
    • Actions
      • Custom script: set udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())] = udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())] + 1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShimeringPortalParts[(Player number of (Owner of (Item being manipulated)))] Equal to 4
        • Then - Actions
          • Quest - Display to (All players) the Quest Update message: |cff995500(Part 2 o...
          • Quest - Mark ShimeringPortalQuest[2] as Completed
          • Player - Add 3 to (Triggering player) Current lumber
          • Hero - Add 20 experience to (Triggering unit), Show level-up graphics
        • Else - Actions
          • Trigger - Turn off (This trigger)

Done?But When you told me first math, there wasnt just math, it was MMath-.., with what math to select please tell.
 
Wow, you actually used the custom script that I gave you. I wouldn't have guessed you knew how to input JASS better than you knew clicking through that annoying gooey tree.

The JASS actually had a catch that conflicts with your other GUI, so to fix:

JASS:
set udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())+1] = udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())+1]+1

The second "math" you would need to click is called "Arithmatic", like it says in step 2. I'm not going to check to see if I'm wrong on that becuase I refuse to labor with that disgusting box-tree GUI.
 
Level 5
Joined
Sep 12, 2009
Messages
82
Wow, you actually used the custom script that I gave you. I wouldn't have guessed you knew how to input JASS better than you knew clicking through that annoying gooey tree.

The JASS actually had a catch that conflicts with your other GUI, so to fix:

JASS:
set udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())+1] = udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())+1]+1

The second "math" you would need to click is called "Arithmatic", like it says in step 2. I'm not going to check to see if I'm wrong on that becuase I refuse to labor with that disgusting box-tree GUI.

  • Shimering portal part 2 completition
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Shimering portal parts
    • Actions
      • Custom script: set udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())+1] = udg_ShimeringPortalParts[GetPlayerId(GetTriggerPlayer())+1]+1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShimeringPortalParts[(Player number of (Owner of (Item being manipulated)))] Equal to 4
        • Then - Actions
          • Quest - Display to (All players) the Quest Update message: |cff995500(Part 2 o...
          • Quest - Mark ShimeringPortalQuest[2] as Completed
          • Player - Add 3 to (Triggering player) Current lumber
          • Hero - Add 20 experience to (Triggering unit), Show level-up graphics
        • Else - Actions
          • Trigger - Turn off (This trigger)
Ok that is my trigger i will see if it is working and report you back, since i am still learning C++ and i don't know anything, just not yet started, i have to know if i change to another item,, so i should change name in that cusom script insted of ShimeringPortalParts?
 
Status
Not open for further replies.
Top