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

This system cannot use with UNIT_PICKUP_ITEM

Status
Not open for further replies.
Level 5
Joined
Jan 4, 2009
Messages
118
Sorry and This My Trigger Use to Recipe Item by call function Make_Item from Zeatherann

JASS:
function recipe_Actions takes nothing returns nothing
     local unit u = GetManipulatingUnit()
     call Make_Item(u)
     set u = null
endfunction

function InitTrig_RecipeItem takes nothing returns nothing
     local trigger t = CreateTrigger()
     call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_PICKUP_ITEM)
     call TriggerAddAction(t, function recipe_Actions)
     set t = null
endfunction

this for error and game cash!!
plz help me..
 
Try changing it to this:
JASS:
function recipe_Actions takes nothing returns nothing
     local unit u = GetManipulatingUnit()
     call DisableTrigger(GetTriggeringTrigger())
     call Make_Item(u)
     call EnableTrigger(GetTriggeringTrigger())
     set u = null
endfunction

function InitTrig_RecipeItem takes nothing returns nothing
     local trigger t = CreateTrigger()
     call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_PICKUP_ITEM)
     call TriggerAddAction(t, function recipe_Actions)
     set t = null
endfunction

I assume that it is creating an infinite loop. (as in, once a unit picks up an item, it will make him pick one up again with "Make_Item", and then it will fire the trigger and keep repeating the loop until it crashes)
 
Level 5
Joined
Jan 4, 2009
Messages
118
OH!! but that System is useful? and Should I that system...?
First ... I think that systems is Good. Now I think it more loop and If I add new items array
It's mean loop equal array and array Arghhhh.

Should I uses This SYstems.
Tell me plz!!

Thanks Guys to help me.
 
Level 5
Joined
Jan 4, 2009
Messages
118
Sorry for my posted, I not skill for my language and thanks you very much for help me!! It's work on that system. I wanna you to explain me with Event causes created an infinite loop. Why so that? I ever error that problem from other trigger before, but I don't WHY?

If you have sometime, plz. Tell me more and thanks a lot.
Now I didn't use that system and I will try created my system for recipe item, but it's not good and I will do manual recipe each item instead..... T_Ta

Thanks a lot for help me. ^ ^a
 
Status
Not open for further replies.
Top