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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  4. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  5. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  6. 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.

Item Wielding

Discussion in 'Triggers & Scripts' started by Watadrag, May 22, 2009.

  1. Watadrag

    Watadrag

    Joined:
    May 20, 2009
    Messages:
    6
    Resources:
    0
    Resources:
    0
    I'm trying to create a trigger is when a unit clicks on a weapon a model will appear on the units arm. Kind of like Master crafters. But you click on the item to equip it.
     
  2. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    982
    Resources:
    1
    Spells:
    1
    Resources:
    1
    You mean like when you pick up a sword then you get it in the right hand ?
    Or
    if you click the weapon on the ground you get it in the hand ?

    if 1 then Download a weapon model then create an ability for instance: Devetion aura set everything to 0 and make the effect to the weapon model add the ability to the item you want and you get it.
    Attachments: hand, right or hand, left if weapon

    if 2 then make trigger
    • Event Response - Unit is selected
    • Condition - selected unit equal to YOURITEM/UNIT
    • action
    • destroy special effect - udg_Specialeffect
    • Create special effect on unit - hand, right (the effect).
    • set special effect = last created special effect
     
  3. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Are the items actually items, or can you create units instead?
    If you can create units instead of those items, you can use a selection-event.

    e.g.: When the unit is right-clicked (A units is issued targetting an object), you can remove the unit and replace it with an item (and give the item to the hero), but when it is selected, your trigger activates...
     
  4. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    982
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Yes thats what i mean with the unit selected event u need to make a dummy item as a unit.
     
  5. Watadrag

    Watadrag

    Joined:
    May 20, 2009
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Well actually i want the thing to be the same model except with the weapon equiped on it. For example when they equip a sword the sword appears on the model's hand.
     
  6. Toilet Maker

    Toilet Maker

    Joined:
    Apr 25, 2008
    Messages:
    75
    Resources:
    0
    Resources:
    0
    Quick answer here. I don't really know much but my map making buddy has done something like this, I'll open his map up in like 5 mins and see how he does it. But you might want to read this:
    http://world-editor-tutorials.thehelper.net/attachments.php
    It's a tutorial on attachments. That's where I would go to start with.
    EDIT: Okay, I checked my mate's map. The way he's done is like the tutorial. He's added attachment points to an ability and given the ability to an item. Of course this shows when you pick it up. Maybe you could try making the item turn into another item (or another form) which has the ability with the attachments. Because a problem I see with your way is that it will still get the bonus (eg. +100 damage) even if the item hasn't been clicked (it's just sitting in their inventory).

    As for how to switch the item I would have no idea (through object editor) because I'm pretty bad with object editor but it could be simple in the trigger editor. (Be sure to remove the old item first so that there is an empty slot).
     
  7. Lord_BoNes

    Lord_BoNes

    Joined:
    Sep 5, 2007
    Messages:
    264
    Resources:
    0
    Resources:
    0
    What you do to "swap" an item:
    Create a "dummy" ability using an ability that doesn't need a target, but still requires it to be used (eg: berserk)
    Loop through all 6 slots of the characters inventory, finding which one the item being used is in.... store that slot number in a variable.
    Remove the "swapping" item, and create the new one in slot number that you stored. :thumbs_up:
     
  8. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    982
    Resources:
    1
    Spells:
    1
    Resources:
    1
    You make a dummy ability whit got the target your self on your hand, right if its a weapon then you make the target effect to the weapon you want and then give the ability to an item so when you equip it you get it in your right hand