Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Items

Discussion in 'Triggers & Scripts' started by Godgodessrelic, Feb 11, 2010.

  1. Godgodessrelic

    Godgodessrelic

    Joined:
    Jun 4, 2008
    Messages:
    37
    Resources:
    0
    Resources:
    0
    I am making a map in which I will use attachments for items(makes it cooler).
    Anyway, the problem is that the hero can take up to 6 swords or shields... That makes it look pretty stupid so i put all the shields in one class of items and the swords in another. I used a very simple trigger:

    • Helmet
      • Events
        • Unit - A unit Acquires an item
      • Conditions
        • (Item-class of (Item being manipulated)) Equal to Artifact
      • Actions
        • If (((Hero manipulating item) has an item of type (Random level -1 Artifact item-type)) Equal to True) then do (Hero - Drop (Item being manipulated) from (Hero manipulating item)) else do (Do nothing)


    but it works only once. After that the hero can take 6 sword or shield again.
    If anyone knows how to fix this, or a better way to solve my problem, please tell me and I will give you rep :cute:
     
    Last edited: Feb 12, 2010
  2. Maximilianx

    Maximilianx

    Joined:
    Oct 14, 2008
    Messages:
    334
    Resources:
    0
    Resources:
    0
  3. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    Please use the trigger tags for the trigger. I will then see much better how you've made it. :wink:
     
  4. Godgodessrelic

    Godgodessrelic

    Joined:
    Jun 4, 2008
    Messages:
    37
    Resources:
    0
    Resources:
    0
    • Helmet
      • Events
      • Unit - A unit Acquires an item
      • Conditions
      • (Item-class of (Item being manipulated)) Equal to Artifact
      • Actions
      • If (((Hero manipulating item) has an item of type (Random level -1 Artifact item-type)) Equal to True) then do (Hero - Drop (Item being manipulated) from (Hero manipulating item)) else do (Do nothing)


    Any Ideas?
     
  5. skamigo

    skamigo

    Joined:
    May 22, 2009
    Messages:
    265
    Resources:
    4
    Maps:
    4
    Resources:
    4
    Is this the only trigger you're using?

    from what I see, this trigger should always drop the item you pick up, as the condition is always valid, because you always pick up an artifact (the item you picked up is in your inventory when the condition is checked). But this doesn't explain why the trigger would only work once.

    Also instead of using Hero manipulating item, you can just use triggering unit

    Oh crap I just realised, you're using 'random item type', that means it doesn't check all item types, it just picks a random one out, and if it's not the item you're holding it won't drop.

    Anyways, if you want this to work, I'd use 2 triggers

    1 for when you pick up a sword for the first time, to turn on the second trigger that would drop each sword you pick up

    oh and you'll need a third trigger to turn the second off for when you drop the item (use a variable for that item)
     
    Last edited by a moderator: Feb 14, 2010
  6. Maximilianx

    Maximilianx

    Joined:
    Oct 14, 2008
    Messages:
    334
    Resources:
    0
    Resources:
    0
    While your at it skamigo why not throw in a fourth trigger for when you think about the item? And maybe a fifth just for the lulz.
     
  7. skamigo

    skamigo

    Joined:
    May 22, 2009
    Messages:
    265
    Resources:
    4
    Maps:
    4
    Resources:
    4
    And a 6th to make you sound like a douche...oh wait, there's no need for that