Will this trigger work?

Astal

New Member
Reaction score
1
Its an item combine, and i want so if the hero has any of the 4 swords it will still work. Will it bug if the game tries to remove an item the hero doesnt have? If so how could i get around that

Trigger:
  • Godly Sword of Pain
    • Events
      • Unit - A unit enters Item Combine <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Entering unit) has (Item carried by (Entering unit) of type Upgrade Gem)) Equal to True
          • ((Entering unit) has (Item carried by (Entering unit) of type Godly Gem)) Equal to True
          • ((Entering unit) has (Item carried by (Entering unit) of type Sword)) Equal to True
          • Or - Any (Conditions) are true
            • Conditions
          • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Desolation)) Equal to True
          • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Flame)) Equal to True
          • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Frost)) Equal to True
          • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Lightning)) Equal to True
        • Then - Actions
          • Item - Remove (Item carried by (Entering unit) of type Ultimate Sword of Desolation)
          • Item - Remove (Item carried by (Entering unit) of type Ultimate Sword of Flame)
          • Item - Remove (Item carried by (Entering unit) of type Ultimate Sword of Frost)
          • Item - Remove (Item carried by (Entering unit) of type Ultimate Sword of Lightning)
          • Item - Remove (Item carried by (Entering unit) of type Upgrade Gem)
          • Item - Remove (Item carried by (Entering unit) of type Godly Gem)
          • Item - Remove (Item carried by (Entering unit) of type Sword)
          • Item - Create Godly Sword of Pain at (Position of (Entering unit))
          • Hero - Give (Last created item) to (Entering unit)
        • Else - Actions
          • Do nothing
 

hunterrravyn

TH.net Regular
Reaction score
19
I dont see any problems with it but what if the hero has two swords? it would get rid of both. i.e. In the Or conditions
 

jig7c

Stop reading me...-statement
Reaction score
123
the Or-Conditions are messed up..there are none...

you need to indent, move the rest of the conditions below or-conditions....

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Entering unit) has (Item carried by (Entering unit) of type Upgrade Gem)) Equal to True
      • ((Entering unit) has (Item carried by (Entering unit) of type Godly Gem)) Equal to True
      • ((Entering unit) has (Item carried by (Entering unit) of type Sword)) Equal to True
    • Or - Any (Conditions) are true
      • Conditions
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Desolation)) Equal to True
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Flame)) Equal to True
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Frost)) Equal to True
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Lightning)) Equal to True


replace this part:
Trigger:
  • Item - Remove (Item carried by (Entering unit) of type Sword)
    • Item - Create Godly Sword of Pain at (Position of (Entering unit))
    • Hero - Give (Last created item) to (Entering unit)


with:
Trigger:
  • Item - Remove (Item carried by (Entering unit) of type Sword)
    • Set Temppoint = Position of (Entering unit)
    • Item - Create Godly Sword of Pain at (Temppoint)
    • Hero - Give (Last created item) to (Entering unit)
    • Custom script: call RemoveLocation(udg_Temppoint)


and no, it will not bug the game if the hero doesn't have the item..
just make sure two heroes don't enter Item Combine at the same time.. although thats a rare possiblity...
 

Astal

New Member
Reaction score
1
the Or-Conditions are messed up..there are none...

you need to indent, move the rest of the conditions below or-conditions....

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Entering unit) has (Item carried by (Entering unit) of type Upgrade Gem)) Equal to True
      • ((Entering unit) has (Item carried by (Entering unit) of type Godly Gem)) Equal to True
      • ((Entering unit) has (Item carried by (Entering unit) of type Sword)) Equal to True
    • Or - Any (Conditions) are true
      • Conditions
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Desolation)) Equal to True
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Flame)) Equal to True
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Frost)) Equal to True
        • ((Entering unit) has (Item carried by (Entering unit) of type Ultimate Sword of Lightning)) Equal to True


replace this part:
Trigger:
  • Item - Remove (Item carried by (Entering unit) of type Sword)
    • Item - Create Godly Sword of Pain at (Position of (Entering unit))
    • Hero - Give (Last created item) to (Entering unit)


with:
Trigger:
  • Item - Remove (Item carried by (Entering unit) of type Sword)
    • Set Temppoint = Position of (Entering unit)
    • Item - Create Godly Sword of Pain at (Temppoint)
    • Hero - Give (Last created item) to (Entering unit)
    • Custom script: call RemoveLocation(udg_Temppoint)


and no, it will not bug the game if the hero doesn't have the item..
just make sure two heroes don't enter Item Combine at the same time.. although thats a rare possiblity...

Is there any easy way to fix that? The taking of any swords the hero has?
 

jig7c

Stop reading me...-statement
Reaction score
123
it won't bug the way it is right now, because there are no waits involved, and its instant...
 

jig7c

Stop reading me...-statement
Reaction score
123
can i see ur entire trigger?


this is what it should look like...
Trigger:
  • Item1
    • Events
      • A unit enters Item Combine <gen>
    • Conditions
      • ((Triggering unit) has an item of type Upgrade Gem) Equal to True
      • ((Triggering unit) has an item of type Godly Gem) Equal to True
      • ((Triggering unit) has an item of type Sword) Equal to True
      • Or - Conditions
        • ((Triggering unit) has an item of type Ultimate Sword of Desolation) Equal to True
        • ((Triggering unit) has an item of type Ultimate Sword of Flame) Equal to True
        • ((Triggering unit) has an item of type Ultimate Sword of Frost) Equal to True
        • ((Triggering unit) has an item of type Ultimate Sword of Lightning) Equal to True
    • Actions
      • Item - Remove (Item carried by (Triggering unit) of type Ultimate Sword of Desolation)
      • Item - Remove (Item carried by (Triggering unit) of type Ultimate Sword of Flame)
      • Item - Remove (Item carried by (Triggering unit) of type Ultimate Sword of Frost)
      • Item - Remove (Item carried by (Triggering unit) of type Ultimate Sword of Lightning)
      • Item - Remove (Item carried by (Triggering unit) of type Upgrade Gem)
      • Item - Remove (Item carried by (Triggering unit) of type Godly Gem)
      • Item - Remove (Item carried by (Triggering unit) of type Sword)
      • Hero - Create Godly Sword of Pain and give it to (Triggering unit)
 

canons200

New Member
Reaction score
50
Item - Remove (Item carried by (Entering unit) of type Sword)
Set Temppoint = Position of (Entering unit)
Item - Create Godly Sword of Pain at (Temppoint)
Hero - Give (Last created item) to (Entering unit)
Custom script: call RemoveLocation(udg_Temppoint)

this is actually no need to create item at the ground, just use the action >> hero -create item for hero (can be used for unit too) if the hero don't have space in the inventory, the item will auto drop on the ground

for the any sword condition. Thsi is a bit more-work. Add 4 more if-then-else action to response for each of the ultimate sword of D,F,F,L

last but not least, remove the action in the else "do nothing", the trigger will perform do nothing, which may decrease trigger efficient
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top