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

[Trigger] Triggers Involving Items

Status
Not open for further replies.
Level 5
Joined
Jun 5, 2007
Messages
99
Hey everyone! I've been working on my RPG again, and after MANY tries, I still cannot find a trigger that actually works with items well.

For example - I would like a quest that can only be completed if the triggering unit (which has to be the StartingHeroDATA variable in my case) has the said item (Hay, for example).

  • FoodDeliveryCOMPLETE
    • Events
      • Unit - A unit comes within 256.00 of Arthas 0071.
    • Conditions
      • (Triggering unit) Equal to StartingHeroDATA
    • Actions
      • Item - Remove Hay 0217 <gen>
      • Game - Display to (All players) the text: Did it work?
      • Quest - Mark FoodDeliveryQUESTDATA as Completed
      • Item - Create Tome of Experience at (Center of RobertFoodTurnIn <gen>)
Thats the trigger I have, but I cant figure out what condition or event I need to get it so that the quest can only be completed if the StartingHeroDATA walkas up to Arthas, and has the Hay.

Knowing that information, I'll finally be able to create the quests I've been working on forever.

~Saryeit

EDIT: Updated the trigger.
 
Level 5
Joined
Jun 5, 2007
Messages
99
  • FoodDeliveryCOMPLETE
    • Events
    • Conditions
      • ((Triggering unit) has an item of type Tome of Experience) Equal to True
    • Actions
That look about right?

EDIT: Thank you VERY much, I couldn't find it because I never looked under boolean.

I really appreciate your help, +rep for sure!
 
Level 9
Joined
Apr 14, 2007
Messages
437
1234567890123456
  • FoodDeliveryCOMPLETE
    • Events
      • Unit - A unit comes within 256.00 of Arthas 0071.
    • Conditions
      • (Triggering unit) Equal to StartingHeroDATA
    • Actions
      • Item - Remove Hay 0217 <gen>
      • Game - Display to (All players) the text: Did it work?
      • Quest - Mark FoodDeliveryQUESTDATA as Completed
  • [COLOR="Green"]-----Heres what I added-----[/COLOR]
    • Set temp_location = (Position of (Arthas 0071))
    • Item - Create Tome of Experience at (Center of temp_location <gen>)
    • Custom script: call RemoveLocation(udg_temp_location)
  • [COLOR="Green"]-----Heres what I added-----[/COLOR]
this new trigger removes the leaks from it. just add the custom scripts and set trigger part to your own trigger and voila.
 
Status
Not open for further replies.
Top