| 09-22-2003, 03:34 AM | #1 |
As the topic says, I want to make it so that when a hero aquires an item, the item will show in his hand. Being that of a shield, sword, spear, glaive or whatnot. This I can do so far; Untitled Trigger 001 Events Unit - A unit Acquires an item Conditions (Item being manipulated) Equal to (Item carried by (Triggering unit) of type Kelen's Dagger of Escape) Actions Special Effect - Create a special effect attached to the hand left of (Triggering unit) using war3mapImported\runeblade.mdx This works, and creates the specified item in his hands. BUT If the hero were to drop it, for another better item, what the h*** should I do ?! I can't seem to find a trigger that will allow me to monitor when an item is dropped, so that I could say: Untitled Trigger 002 Events Unit - A unit Is issued an order targeting a point Conditions (Issued order) Equal to (Order(drop)) Actions Special Effect - Destroy (Last created special effect) The above don't work at all... Now, this is one of my issues. For another issue, as this is going to be a multiplayer map, it will become very annoying when someone other sells/drops an item, thus removing the last created special effect...being that of the hero before this guy who aquired an item :P Anyone have some brilliant ideas on this, or is it not possible.. I think that this would add alot of character to my map, and give it a special feel, so I really want this to work. Help ? :)= |
| 09-22-2003, 03:37 AM | #2 |
Event is Hero loses an Item. |
| 09-22-2003, 03:38 AM | #3 |
and don't do last created special effect. Use variables to keep track of the special effects. |
| 09-22-2003, 03:46 AM | #4 | |
Quote:
Yes, if you don't, your trigger will backfire on you one day. Like, the hero will drop a sword and lose his shield... |
| 09-22-2003, 03:48 AM | #5 |
Yes, that was what I ment at the end of my post. How do I keep track with variables? And no, the hero looses an item doesn't work. As I need to specify what item is lost as well.. Can I add items to variables? So I specify that itemA is swordX and itemB is shieldX ? EDIT: Loose item works, but that is without a condition. I really need thoes variables to keep track of everything...xperts HELP :)) |
| 09-22-2003, 03:57 AM | #6 |
Use the hero loses item event. Use item-type comparrison for the item being manipulated. Create special effect variables "sword", "shield", etc in the Variable editor (Ctrl+B in trigger editor) When hero picks up sword or whatever, do your create special effect action; then right after it, use Set Varaible action and set the "sword" varialbe to the last created special effect, or the shield, or whatever item is being added. When the hero drops it, do destroy special effect, and then just pick the variable name from the list like "sword" :D |
| 09-22-2003, 04:54 AM | #7 |
Omg...I actually made this work :)) Also did so that the hero can only have one sword at a time. If he tries to pick up another sword, it will drop it where he stands, and the biggest problem with that was, that it counted as him loosing an item, thus removing the item from his hand as well (special effect) BUT!!!!! I just cracked it, but turning sword into a variable of 2 when it's dropped because of another sword being picked up, and then back to 1 after it has been confirmed that it does nothing! :) Here is the map, try it out, I think it's great. If anyone is going to use this, please give me and Draco creds, as I've worked on this for 2½ hours now :P And Draco made me go onto the right track :) Thanks Draco |
| 09-22-2003, 12:27 PM | #8 |
Here is an updated version, the hero can now choose between 3 different weapons, a shield and a helmet :) Only one can be worn at any time. Feel free to use this, as long as I'm credited (Won't have all my hard work gone to waste) Now to making the map :) hhahahahahaha :) |
| 09-22-2003, 01:00 PM | #9 |
No. |
| 09-22-2003, 01:15 PM | #10 |
Beacause orbs float arround hands, trust me, this is the only way to do it properly. And it works, beautifully :) hehe Vex, this also checks for if the hero has an item of that type, so that only one item of the type can be wielded at the same time. |
| 09-22-2003, 01:23 PM | #11 |
But, it will always be attached to one hand specific, this way I can tell it where to go, if the heroes model doesn't allow for left hand to be used (cos there is a book there or something) I'll stick to this one, if it turns out that it will lag too much, I might try something else. I like how this goes, and I made it myself...even better :) But thanks for the input Vex |
| 09-22-2003, 04:16 PM | #12 |
why aren't you just using the art fields of the item's abilites? if you took at the orbs' art, you will wee that the model itself obits a central point. If you use a sword model (as lond as it has no wierd animations) then it will simply be held. You are overcomplicating thing. But, nice trigger to only let heros carry one weapon. |
