• 🏆 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!

item unit swap

Status
Not open for further replies.
Level 3
Joined
May 7, 2007
Messages
45
Hi i am using a item were when ckilcked will but your unit in a mairne suit but can as so hold more then 1 suit item at a time when u drop the item u will turn back in to your normal form. the problem i have been haveing is i have been using a trigger and the trigger has swaped the units but i never clicked the item and the item is not in the inventory of the other unit can u help me?:infl_thumbs_up:
 
Level 8
Joined
Jan 18, 2007
Messages
331
first, you have to be more precise...
make sure the trigger checks that the "item of being manipulated" is in the heros inventory like

item of being manipulated equal to carried of hero (ur hero) in slot ....
cant remeber how to ignore that slot specified thing... and then make the item activates upon aquiering to false(un check the box)(or make it similar)

elles i cant help u cus i cant understand you...
 
Level 3
Joined
May 7, 2007
Messages
45
ok sorry i was not clear enough the problem is that i have writen the trigger right but the problem is when it replaces the old unit with the new the item is gona and when i set the trigger to when used it does not work at all. see u should be able to change freely back and forth between being in a suit of armour and not haveing it on. think of how the parasite 2 units work.
 
Level 3
Joined
May 7, 2007
Messages
45
ok i tried your trigger and it is still not working. the wep attachment for the new unit is coming up after the unit picks up the item but when i go to use the item it will not switch the units and when i switch the trigger around it did nothing but mutiply the unit.
 
Level 3
Joined
May 7, 2007
Messages
45
This is the trigger i have been using to switch the units but it is destorying the item and i need it so i can use the item to get in the armour but when i drop the item i will turn back in to my normal state.

Trigger:
Events
Unit - A unit Uses an item
Conditions
((Item carried by (Hero manipulating item) of type Sniper Suit) is owned) Equal to True
Actions
Unit - Replace (Hero manipulating item) with a Sniper using The new unit's default life and mana


here is a piic to give u the more genreal idea im going at: :am: + item= :wink:
:wink: - item= :am:
 
The trigger for equipping the suit:
  • Sniper Suit
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Sniper Suit
    • Actions
      • Unit - Replace (Triggering Unit) with a Sniper using The new unit's default life and mana
      • Hero - Create Sniper Suit (In use) and give it to (Last replaced unit)
The trigger for un-equipping the suit:
  • Sniper Suit
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Sniper Suit (In use)
    • Actions
      • Unit - Replace (Triggering Unit) with a "NormaUnit" using The new unit's default life and mana
      • Hero - Create Sniper Suit and give it to (Last replaced unit)
You need two items here:
"Sniper Suit":Activates the switch.
"Sniper Suit (In use)":Turns the unit normal again.
I think this oughta work fine... Atleast I hope so!
 
Level 3
Joined
May 7, 2007
Messages
45
ya i tried your trigger and it did not work it looks like i will be scraping this progect till a later tiem when i have figured out how to work this trigger.
 
Level 8
Joined
Feb 20, 2007
Messages
338
You might want to add/remove an ability to the units.

I was working on a method to where a hero unit would go home to "change" into armor. I kept on having problems with the replace unit - because as a hero the replaced unit would start off with the same level as the unit it is replacing but all the skills/abilities had to be "relearned".

Adding and removing "crow form" or a similar unit switching spell as part of your trigger may work.

Something along the lines of:

  • Changing via item
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • Unit - Add Change outfit to (Triggering unit)
      • Unit - Order (Triggering unit) to Special Medivh - Raven Form
      • Unit - Remove Change outfit from (Triggering unit)
The custom spell is based on Crow (raven) form, thus to use the spell we have the unit use Raven form (or human form how ever you set it up.


Then you would have another trigger based on
  • Unit - A unit Loses an item
Upside, you should be able to get around one problem, downside is that you can not use "crow form" for two customized spells for one unit then expect ordering a unit without a target to work for the form you want or need. There are several shape-shifting types of spells that you can use for different changes.
 
Level 3
Joined
May 7, 2007
Messages
45
Jaakko u hit it right on the money it is working perfecly now. and thx to all for your help.
 
Status
Not open for further replies.
Top