1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
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