🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
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.
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).
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...
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.
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.
You can also just use a trigger to attach a model or special effect. Just use this trigger action.
Special Effect - Create a special effect attached to the left hand of (Triggering unit) using Sword1.mdx
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).
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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.