Yet another Trigger issue xD

n4bieclimber

New Member
Reaction score
1
owk heres the sit. i want that if i pick up an item that i already have that it combines the usages of those 2 in one.

Code:
Untitled Trigger 001
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Item being manipulated) is owned) Equal to True
    Actions
        Set Charges = (Charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))))
        Set charges_picked_up = (Charges remaining in (Item being manipulated))
        Item - Set charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) to (Charges + charges_picked_up)
        Item - Remove (Item being manipulated)

what happens is it combines the 2 but only if i already have one if i dont they dissappear in thin air. I also want to limit the usages to lets say 10

srry if this has been posted yet but i dont know on what keywords i should search. most hits are about recipe systems.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
maybe add an condition that checks if the unit has already one of these items
 

darkbeer

Beer is Good!
Reaction score
84
well, wont work since item being manipulated and item of type of item being manipulated will most likely return the same item:

you could try something like this:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Item being manipulated) is owned) Equal to True
    Actions
        Item - Move item to Position of Triggering Unit
        Set Charges = (Charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))))
        Set charges_picked_up = (Charges remaining in (Item being manipulated))
        if all Conditions are true... then
              Charges equal to 0
        Actions -
              Item - Give Item being manipulated to triggering unit
        Else -
              Item - Set charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) to (Charges + charges_picked_up)
               Item - Remove (Item being manipulated)
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
The combine trigger is in the list from the thread Ghan gave, very simple, very small, very effective.
 
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