1. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  2. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  3. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  4. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  5. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  6. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  7. 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] no tomes?

Discussion in 'Triggers & Scripts' started by CHA_Owner, Apr 14, 2009.

  1. CHA_Owner

    CHA_Owner

    Joined:
    Feb 11, 2008
    Messages:
    808
    Resources:
    2
    Spells:
    2
    Resources:
    2
    i made an item that summons a pack mule for a period of time how can i make it so that the summed unit cannot buy tomes since right now it causes game to crash :(
     
  2. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    Well, you need to trigger it.

    Events
    A unit starts the effect of an ability
    Conditions
    Ability being cast Equal to (Your summoning ability)
    Actions
    Set Point1 = (Position of (Casting unit))
    Unit - Create 1 Pack Mule for (Owner of (Triggering unit)) at Point1 facing defaulkt building degrees
    Unit - Add X.00 seconds Generic expiration timer to (Last created unit)
    Custom script: call RemoveLocation (udg_Point1)

    Events
    A unit acquires an item
    Conditions
    ((Unit-type of (Hero Manipulating Item)) Equal to Pack Mule
    (Item-type of (Item being Manipulated)) Equal to Tome of Experience)
    Actions
    Set Point2 = (Position of (Hero Manipulating Item))
    Unit - Order (Hero Manipulating Item) to drop (Item being manipulated) at Point2
    Custom script: call RemoveLocation (udg_Point2)




    Edit: It doesn't work. Sorry.


    Edit2:

    Events
    Unit - A unit Is issued an order targeting an object
    Conditions
    (Unit-type of (Ordered unit)) Equal to Pack Horse
    (Item-type of (Target item of issued order)) Equal to Tome of Experience
    Actions
    Unit - Order (Ordered unit) to Stop

    This?

    Edit3: Neither this can work. I reeeeeeally don't know.
     
  3. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,080
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    I assume you gave the pack mule an inventory?
    The inventory is the hero inventory (Which allows the unit to buy and use items). Copy the ability [creating a new one] and remove the flag that allows the unit to buy items [from the ability]
    And be sure to give your unit the new inventory ability, instead of the other one.
     
  4. Smiddle

    Smiddle

    Joined:
    Mar 12, 2008
    Messages:
    434
    Resources:
    1
    Maps:
    1
    Resources:
    1
    "Can get items", that is?

    But that removes the capability of purchasing items, doesn't it?
     
  5. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,080
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    Well it eliminates the buildings ability to select the unit as a hero. "Can get items" keeps units from giving that unit items, i believe. I think what might be causing the crash, is that the unit has items when it's expiration timer 'expires'. Which would make the items disappear into oblivion.
    So maybe an expiring pack horse would be a bad idea.
    Maybe you could have a pack horse vendor. and make units drop items once they enter a region or something.
     
  6. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    Ahm, no, the bug occurs by the time you pick up an item of type tome of Experience, so the crash is done due to the lack of experience bar of the unit; i mean, inventory is created for heroes mostly. Even the ability out of Unit abilities is called "Inventory (Hero)".
     
  7. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,080
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    Which is what i was suggesting at first. Making the hero inventory a unit inventory. That cannot USE items. I was misunderstood. Maybe because I didn't make myself clear.
    And for the misconception, the hero inventory is a unit ability because it is not supposed to be levellable. Hero abilities are castable and levellable abilities (for the most part). Unit abilities are normally just general abilities given to the unit.
     
  8. CHA_Owner

    CHA_Owner

    Joined:
    Feb 11, 2008
    Messages:
    808
    Resources:
    2
    Spells:
    2
    Resources:
    2
    I know there is a GUI trigger for this my friend who is on vacation made one that worked so someone please try to find one for me
     
  9. Super-Sheep

    Super-Sheep

    Joined:
    Oct 21, 2006
    Messages:
    2,822
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Make FAKETOMES and REALTOMES.

    When unit acquires FAKETOMEOFAGILITY then do nothing.
    When hero acquires FAKETOMEOFAGILITY then remove FAKETOMEOFAGILITY from the game and create item REALTOMEOFAGILITY for hero-manipulating-item.

    FAKETOMES are just items without any abilities, they just have same icon as normal tomes.
     
  10. CHA_Owner

    CHA_Owner

    Joined:
    Feb 11, 2008
    Messages:
    808
    Resources:
    2
    Spells:
    2
    Resources:
    2
    i dont really understand what you are saying?
     
  11. Magissia

    Magissia

    Joined:
    Apr 8, 2009
    Messages:
    56
    Resources:
    0
    Resources:
    0
    Make a tome that do nothing and don't auto-use, if a unit pick it upn then do nothing, if a hero pick it up, then delete this fake tome and add XXX exp / str / int / agi to the hero
     
  12. CHA_Owner

    CHA_Owner

    Joined:
    Feb 11, 2008
    Messages:
    808
    Resources:
    2
    Spells:
    2
    Resources:
    2
    I decided to just change the pack mule to a hero unit and it fixed everything ty for the help though
     
  13. Meticulous

    Meticulous

    Joined:
    Nov 15, 2007
    Messages:
    779
    Resources:
    0
    Resources:
    0
    ...Okay, but picking up a tome with your pack mule will still waste it, right?
     
  14. jadegolem

    jadegolem

    Joined:
    Feb 1, 2008
    Messages:
    293
    Resources:
    0
    Resources:
    0
    The answer to your solution is very simple. If you want the mule to carry but not be able to use items, create another inventory(hero) ability and check off the box that says "Can use items". If you want the mule to use items but not get tomes, the answer is very easy as it is a simple trigger.
    • Tome
    • Events
      • Unit - A unit uses an item
    • Conditions
      • Borlean - (Hero Manipulating Item) is a hero equal to true
    • Actions
      • If (Item type of (Item Being Manipulated) equal to Tome of Strength then (Hero - Set strength of (Hero Manipulating Item) to (Strength of (Hero Manipulating Item) + <Wanted Value>)


    As you can see, you can easily change the item type and the attribute type without mistakes. Sorry about the icons, I cant seem to remember the correct name of the triggers but its close.
     
  15. Smiddle

    Smiddle

    Joined:
    Mar 12, 2008
    Messages:
    434
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Yes, but the gold may be refunded using triggers
     
  16. warden13

    warden13

    Joined:
    Aug 19, 2006
    Messages:
    174
    Resources:
    0
    Resources:
    0
    Make a different shop that sells only tomes. There will be no items. Change this unit's abilites to Select Unit -> to Select Hero. So your carrier wont be able to buy here, will able to buy from normal item shops.
     
  17. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,080
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    Or, you could just set the "Automatically use when picked" field to false in all the tomes.
     
  18. Captain Griffen

    Captain Griffen

    Joined:
    Nov 20, 2005
    Messages:
    1,001
    Resources:
    3
    Maps:
    3
    Resources:
    3
    QFT.

    So shut the heck up with your wrong information.