Why doesn't this work? - Triggers/Items/BS

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
What I want this to do is when use an item (wood) with another item (rocks) near by it removes these both and creates an unlit fire, this is kind of like a external item recipie system. It works if i drop the rocks then use the wood right on it but apart from that it's messy as...
I'm pretty tired so... Idk, can you see if there's anything wrong?

Code:
CombineItems
    Events
        Unit - A unit Uses an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Wood
    Actions
        Set tempMolestedItem = (Item being manipulated)
        Set tempHeroMolestingItem = (Hero manipulating item)
        Set tempPosHeroMolestingItem = (Position of tempHeroMolestingItem)
        Item - Pick every item in (Region centered at tempPosHeroMolestingItem with size (200.00, 200.00)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-type of (Picked item)) Equal to Rocks
                        (Item-type of (Picked item)) Not equal to (Item-type of (Item being manipulated))
                        (Item-type of (Picked item)) Not equal to (Item-type of (Last created item))
                    Then - Actions
                        Game - Display to (All players) the text: (Name of the current trigger)
                        Item - Remove tempMolestedItem
                        Item - Remove (Picked item)
                        Item - Create Unlit Fire at tempPosHeroMolestingItem
                        Set tempMolestedItem = No item
                        Set tempHeroMolestingItem = No unit
                        Custom script:   call RemoveLocation (udg_tempPosHeroMolestingItem)
                    Else - Actions
                        Item - Create Wood at (Target point of issued order)
 

emootootoo

Top Banana
Reaction score
51
Events
Unit - A unit Loses an item
Conditions
((Item being manipulated) is owned) Equal to True
If you were to just drop an item on the ground the item would no longer be owned right?
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
I don't know, but that's not really the problem, it does the same with with or without that condition.
 
M

Magwill

Guest
I think Turning Off a trigger only results in that it won't trigger on its event. That you can still run it with Run.

I would have tried adding some event that never happens, mainly because I believe you need an event for a trigger to avoid problems, but I might be wrong.

But the only reason I can see for it to create 2 fires is that you drop it where there are 2 items of rock type in the area. Atm it will create one fire on your hero position every time you find a rock. Don't you want to create the fire on the actual rock?

EDIT:

Or if you want to only take 1 rock from the area, and then make 1 fire on your item, just put Skip Remaining Actions at the end of the "Then" part. I think you have several rocks there and thats whats causing it.
 

Somatic

You can change this now in User CP.
Reaction score
84
Try not to use Run, and also because there is no wait, this trigger almost run like an endless loop...

If im correct...

Hope it helps
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
I had it all in one trigger before but I think that this would only make it run once and not make the second firepit, and what do you mean no wait and endless loop? Where would I need a wait and this trigger turns it's self off so it stops after running.

Thanks for replies by the way.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top