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

Item Trigger Prob

Status
Not open for further replies.
Level 10
Joined
Jan 21, 2007
Messages
576
Hey i got this trigger (see attachment pic) and it if you have the recipe + only one strength of earth it goes in a infite loop and expectedly crashes WE how can i get it so when you have Recipe plus strength of earth your inven stays the same but when you have Recipe + Strength of earth + strength of earth you get it to remove all three and give you Hoof of the Chieftain. (BTW event is Unit Aquires item, i have a working system for items that dont require two of the same item to make.)
EDIT: This trigger would work but at the end it says Give Last dropped item to triggering unit, thus restarting the trigger.
 

Attachments

  • Trigger.JPG
    Trigger.JPG
    64.6 KB · Views: 135
Level 1
Joined
Apr 10, 2007
Messages
5
im not a pro at these triggers but maybe i can help. I think i might see the problem. Well, I was trying to look for a trigger to check for 2 strength of earths in ur condition. that's the first problem. Then, I think why the script is looping is because it checks for the strength of earth item, but since the script starts with only 1, and it's dropped after the condition. so the script loops. Either that or it has to be the hoof item. have u tried the trigger after adding 2 str of earth items to ur hero? then also try it when u have a hoof too. the problem is in one of those conditions. but try to look for a trigger that checks for 2 items. i coudln't find one. but maybe u might have beter luck as i'm not a veteran yet.

Just thought of soemthing that might help. Try putting the event to only start when a player gets an item, that way, when u only have 1 strength of earth, it will only loop once, and shoudln't start over unti u get another item, and it'll recheck it if u got another or not. maybe that might help.
 
Level 10
Joined
Jan 21, 2007
Messages
576
Happy Tauren read my post, itl answer your question. I think i explained why it loops terraslayer. Basicaly the logic is When a unit aquires item it checks if you have a hoof, if you do it drops it then it checks if you have a hoof agian and logicaly if you do you have two hoofs, the prob is if you dont it gives the hero back the item, triggering the trigger agian. Infinite loop = crash. Il check out the link sec.
EDIT: So basicaly in order for the trigger to continue the item needs to have a certain number of cahrges. I thought i might have to do something like this, couldnt i ust use set item custom value?
EDIT: Yep got it working thanks to item custom values.
 
Level 5
Joined
Jan 11, 2006
Messages
110
You just made a really stupid mistake there... you dont need to have it all fancy and junk like that... 1 sec and ill edit this with the post i made of this already
Theres and Easy and effective way of doing this. All you need is this:
Event: Unit aquires and item
Condition: Triggering unit has item of (type(item here))put all the items under that(if u use multiples of the same item it will only require one, if u want multiples i will show you how after i finish the singulars one) (also keep in mind this is boolean not item condition)
Action: Remove item of type (Item here from( Triggering Unit)) put all the items under that and after that use this.
Action: Create item for hero of type (item name) this is a HERO Action not an Item Action. Alright so. To make multiples of one item into one different one instead of using all different ones you need to have in the recipe (Slot 1- Item1, Slot 2- Item1, Slot 3- item 2) so they dont get confused and pissed when it doesnt work, so here goes.
Event: Unit aquires an item
Condition: Triggering unit has item of type (item 1 in slot 1)
Condition: Triggering unit has item of type (item 1 in slot 2)
Condition: Triggering unit has item of type (item 2 in slot 3)
Action: Remove item in slot one from triggering unit
Action: Remove item in slot two from triggering unit
Action: Remove item in slot three from triggering unit
Action: Create item of type (item name for (triggering unit))
and there you have it. Very simple triggers to make, just confusing at first
And its as simple as that, unless you want one trigger for every item that your bonding. IF so then you need to use If/Then/Else Multiple Conditions as your action and leave the base conditions blank and just add more and more for the else action. If/Then/Else triggers look something like this:
Event: Unit aquires item
Conditions:
Event:
l__If Condtion: Unit has item of type(blahblahblah, weve been over this)
Then: Remove item of type etc.(again weve been over this
Else:
l__If Condition: then repeat untill all your items have been made and on the last one fill in Else like this
Else: Do Nothing. Who could ask for any more?
 
Last edited:
Level 10
Joined
Jan 21, 2007
Messages
576
You can actualy use booleans to check if a unit has an item of type instead of checking item slots 1-6 for an item, and i used item custom values to rule out the loop. This thread should die now.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
You bunch are awair that THW has GUI tags???
Just be lucky that this section has little moderation as of yet, since otherwise this would be in the Trigger(GUI) fourm where things are run A LOT more strictly.

Well anyway, to get this to work you just need it to TEMPORLY disable the trigger untill the actions are complete (then renable it at end) via the use of turn trigger on/off. This will stop it being triggered when the hero receives the item in it and thus will not loop infinatly.
 
Status
Not open for further replies.
Top