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

[Solved] Recipe Item...

Status
Not open for further replies.
Level 3
Joined
Dec 25, 2018
Messages
31
Hi Guys! I have a problem about item recipes. My trigger works but when I bought over 1, other combined item destroy.

Recipe Wizard Talisman
Events
Unit - A unit Acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Hero manipulating item) has an item of type Mantle of Intelligence) Equal to True
((Hero manipulating item) has an item of type Circlet of Nobility) Equal to True
((Hero manipulating item) has an item of type Recipe of Wizard Talisman) Equal to True
Then - Actions
Item - Remove (Item carried by (Hero manipulating item) of type Mantle of Intelligence)
Item - Remove (Item carried by (Hero manipulating item) of type Circlet of Nobility)
Item - Remove (Item carried by (Hero manipulating item) of type Recipe of Wizard Talisman)
Hero - Create Wizard Talisman and give it to (Triggering unit)
Special Effect - Create a special effect attached to the chest of (Hero manipulating item) using Abilities\Spells\Items\AIil\AIilTarget.mdl
Wait 1.00 seconds
Special Effect - Destroy (Last created special effect)
Else - Actions
Do nothing

For example; I bought 2 Wizard Talisman, the last created item destroys itself.

I am waiting your answers...:goblin_yeah:
 
Level 2
Joined
Jul 21, 2013
Messages
12
don't know what the problem might be. But i actually see another potencial problem with your trigger. You should add the condition 'item type of item being manipulated equal to Wizard Talisman' otherwise this same trigger might be triggered even when buying some other thing.
Also you should delete the item in the else actions, because you're not satisfying the conditions.
I also noticed you used Triggering unit instead of Hero manipulating item when you create and give the hero the item, why is that?
and aaaalso... don't use a wait between creating a special effect and destroying last created special effect. If another trigger creates a special effect in that time, you might delete the wrong effect and be stuck with that one forever.
 

NEL

NEL

Level 6
Joined
Mar 6, 2017
Messages
113
I created a recipe system if you want to follow it.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
      • ((Triggering unit) has an item of type Crown of Kings +5) Equal to True
    • Actions
      • -------- ======================= --------
      • -------- Remove --------
      • Item - Remove (Item carried by (Triggering unit) of type Claws of Attack +15)
      • Item - Remove (Item carried by (Triggering unit) of type Crown of Kings +5)
      • -------- ======================= --------
      • -------- Add new item --------
      • Hero - Create Mask of Death and give it to (Triggering unit)
      • -------- ======================= --------
      • -------- Special Effect --------
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)

Clean Version:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • -------- ======================= --------
      • -------- Var Init --------
      • Set tempUnit = (Triggering unit)
      • -------- ======================= --------
      • -------- Recipe for Mask of Death --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (tempUnit has an item of type Claws of Attack +15) Equal to True
          • (tempUnit has an item of type Crown of Kings +5) Equal to True
        • Then - Actions
          • -------- ======================= --------
          • -------- Remove --------
          • Item - Remove (Item carried by tempUnit of type Claws of Attack +15)
          • Item - Remove (Item carried by tempUnit of type Crown of Kings +5)
          • -------- ======================= --------
          • -------- Add new item --------
          • Hero - Create Mask of Death and give it to tempUnit
          • -------- ======================= --------
          • -------- Special Effect --------
          • Special Effect - Create a special effect attached to the origin of tempUnit using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
      • -------- ======================= --------
      • -------- Clean --------
      • Set tempUnit = No unit

Try this if it works.
 
Level 3
Joined
Dec 25, 2018
Messages
31
I tried your triggers; but didn't work. Recipe system works but when I bought a few; for example, when I bought 3 Wizard Talisman, a few moments later one talisman destroy itself from my invertory.
Thank you for helping... :psmile:
 
Level 3
Joined
Dec 25, 2018
Messages
31
I found problem guys. :) Another trigger I created prevented my Recipe Trigger. So, I will be more carefull hereafter. Thx for helping all. :goblin_good_job:

Here is my last recipe trigger and works nice;

NOTE: I used 3 items to create(Mantle of Intelligence+Circlet of Nobility+Recipe of Wizard Talisman) Wizard Talisman and I created trigger like this.

Wizard Talisman(My Item Name)


Events

Unit - A unit Acquires an item

Conditions

Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions

(Item-type of (Item being manipulated)) Equal to Mantle of Intelligence
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Triggering unit) has an item of type Circlet of Nobility) Equal to True) and (((Triggering unit) has an item of type Recipe of Wizard Talisman) Equal to True)
Then - Actions
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
Item - Remove (Item carried by (Triggering unit) of type Recipe of Wizard Talisman)
Item - Remove (Item being manipulated)
Hero - Create Wizard Talisman and give it to (Triggering unit)
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions
(Item-type of (Item being manipulated)) Equal to Circlet of Nobility
Then - Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Triggering unit) has an item of type Mantle of Intelligence) Equal to True) and (((Triggering unit) has an item of type Recipe of Wizard Talisman) Equal to True)
Then - Actions
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Item - Remove (Item carried by (Triggering unit) of type Mantle of Intelligence)
Item - Remove (Item carried by (Triggering unit) of type Recipe of Wizard Talisman)
Item - Remove (Item being manipulated)
Hero - Create Wizard Talisman and give it to (Triggering unit)
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions

(Item-type of (Item being manipulated)) Equal to Recipe of Wizard Talisman
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Triggering unit) has an item of type Circlet of Nobility) Equal to True) and (((Triggering unit) has an item of type Mantle of Intelligence) Equal to True)
Then - Actions
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
Item - Remove (Item carried by (Triggering unit) of type Mantle of Intelligence)
Item - Remove (Item being manipulated)
Hero - Create Wizard Talisman and give it to (Triggering unit)
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions



(Don't forget to check other trigger which is like ''Last created item'')


I hope I can help people who have problems like this RECİPE problem. Bye GUYS!! :mwahaha:
 
Status
Not open for further replies.
Top