• 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] Quest item Help needed

Status
Not open for further replies.
Level 25
Joined
Mar 23, 2008
Messages
1,813
Im working on an orpg and im trying to create a quest with a boss involved. I want to get a item (Troll Head) after killing the boss (forest troll warrior). And to finish the quest u need to have troll head in your inventory and enter region. But the problem is: 1. I dont know how to make the item (troll head) drop to only the units with the quest. 2. I dont know how to make like event:"unit enters region" "conditions : Unit have troll head in inventory equal to true." "Action: make quest completed and give reward 200 exp and 100 gold" plz help me.:cry:
 
Level 4
Joined
Jun 1, 2007
Messages
92
When you give the player the quest, add them to a player group such as
  • Untitled Trigger 003
    • Events
    • Conditions
    • Actions
      • Quest - Create a Required quest titled kill troll with the description kill the damn troll..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Player Group - Add Player 1 (Red) to Troll_Quest
then when your guy kills the troll dude, it checks if he is in the Player Group
  • Untitled Trigger 004
    • Events
      • Unit - Scout Tower 0000 <gen> Dies
    • Conditions
      • ((Owner of (Killing unit)) is in Troll_Quest) Equal to True
    • Actions
      • Item - Create Tome of Experience at (Position of (Dying unit))
To enter a region with an item use the condition
  • Untitled Trigger 005
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
      • ((Entering unit) has an item of type Tome of Experience) Equal to True
    • Actions
      • Player - Add 100 to (Owner of (Entering unit)) Current gold
      • Hero - Add 200 experience to (Entering unit), Show level-up graphics
Don't forget to remove the item from the hero when done, or else the trigger will be executed again if he enters.

The condition is Boolean - Hero - Hero has item of type
The condition on the first trigger also is a Boolean - Player- Player is in player group
 
Level 4
Joined
Jun 1, 2007
Messages
92
  • Untitled Trigger 004
    • Events
      • Unit -Troll <gen> Dies
    • Conditions
      • ((Owner of (Killing unit)) is in Troll_Quest) Equal to True
    • Actions
      • Hero - Create Troll Thingy and give it to (Killing unit)
I don't think this will work if a hero's inventory slots are full.
 
Level 4
Joined
Jun 1, 2007
Messages
92
I don't understand what you mean by that. If you mean if someone has the quest is trying to get the quest again, then use this, assuming you are going to keep the player in the player group.
  • Untitled Trigger 003
    • Events
    • Conditions
      • (Player 1 (Red) is in Troll_Quest) Equal to False
    • Actions
      • Quest - Create a Required quest titled kill troll with the description kill the damn troll..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Player Group - Add Player 1 (Red) to Troll_Quest
 
Level 4
Joined
Jun 1, 2007
Messages
92
But why would you need to turn it off, they can't gain the quest unless you make an alternate way. If you need to turn it off after every player has the quest, make a trigger to check if all players are in the playe group, then turn off the trigger.
 
Level 9
Joined
Oct 17, 2007
Messages
547
Make an boolean array (length of the array depends on the number of player) that starts wit "false."
Add to the trigger that takes place after the quest is complete to change the variable value of that player to "true."
Add a condition to the trigger that give the quest to the player; have it check for the "false" value of that boolean variable.
So after a player finishes the quest he/she cant obtain the quest again for that game.
 
Status
Not open for further replies.
Top