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

Replacing items and chaging anims...

Status
Not open for further replies.
Level 2
Joined
Jan 24, 2008
Messages
10
1) Scenario: My Sorceror is holding a sword that actually appears in her hand and she tries to pick-up/buy another item.
2) My wants: The sword in her hand and inventory to be dropped on the ground and the new item to replace it. [can i allocate this 2 certain slots?]
3) Extra: My map is a RPG where your hero is fully custom. At the start you can choose all your starting weapons and spells ans so on. The problem is buying new weapons because if i already have a weapon that has an attachment for my 'left,hand' and i buy a new weapon for my 'left,hand' it would look dumb carrying two weapons in one hand. [maybe instead of all this ordeal i could make so if your pick up a 2 handed weapon and you already have a one handed weapon you must drop the one handed weapon before pick up the two handed weapon?]
4) My also's: If this works out i would also like to know how to make it so if i pick up a weapon in the group of 'two handed' it will drop both my one handed weapons [left,hand and right,hand].
 
Last edited:
Level 12
Joined
Mar 16, 2006
Messages
992
in my map i have made items hav attachment points for swords and so on, these items r not dropable, how do i make it so wen i pik up a 'left' handed weapon it replaces my current 'left' hand weapon so it does not look like i hav 2 swords in 1 hand [my current inv slot for left hand weps is number 1].

a second question possibly more advanced, how do i make it so if i hav a weapon in inventory slot number 2[main weapon] it changes wut attack u do, for example i use a sorceror as my custom model and equip a sword in her 2nd inventory slot she uses a melee attack, but if mi 2nd inventory slot has a gun or bow or ranged wepon in it she will use a ranged attack?

creds 2 ne1 who answeres either question!

I couldn't skim past the horrible writing.

You want one weapon to replace the other? Create abilities with the sword -> hand. Add/remove them as you please.

Don't just keep adding.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
do me a favor vega, stop using that damn quote button

1- try making it hand not left hand or make other item that get repleaced with right one if unit has a left item :p:p

2- Maybe: Unit has invisible orb ability that enables attack 1 you gain bow it removes that orb and adds new orb that only enables attack 2
attack 1 is meele and attack 2 is ranged
 
Level 12
Joined
Mar 16, 2006
Messages
992
do me a favor vega, stop using that damn quote button

1- try making it hand not left hand or make other item that get repleaced with right one if unit has a left item :p:p

2- Maybe: Unit has invisible orb ability that enables attack 1 you gain bow it removes that orb and adds new orb that only enables attack 2
attack 1 is meele and attack 2 is ranged

Using an orb might cause a problem, but I see what you're saying.

Basically c/p-ing the item with an already set attachment, and replacing that with a weapon. It would work, but how would it affect other orbs?
 
Level 2
Joined
Jan 24, 2008
Messages
10
ok hold on, shutup vegeta [or wuteva] about my writing your jus as bad wif ur lil quote.
ill try right what i want easier.

1) Scenario: My Sorceror is holding a sword that actually appears in her hand and she tries to pick-up/buy another item.
2) My wants: The sword in her hand and inventory to be dropped on the ground and the new item to replace it. [can i allocate this 2 certain slots?]
3) Extra: My map is a RPG where your hero is fully custom. At the start you can choose all your starting weapons and spells ans so on. The problem is buying new weapons because if i already have a weapon that has an attachment for my 'left,hand' and i buy a new weapon for my 'left,hand' it would look dumb carrying two weapons in one hand.
4) My also's: If this works out i would also like to know how to make it so if i pick up a weapon in the group of 'two handed' it will drop both my one handed weapons [left,hand and right,hand].
 
Level 12
Joined
Mar 16, 2006
Messages
992
ok hold on, shutup vegeta [or wuteva] about my writing your jus as bad wif ur lil quote.
ill try right what i want easier.

1) Scenario: My Sorceror is holding a sword that actually appears in her hand and she tries to pick-up/buy another item.
2) My wants: The sword in her hand and inventory to be dropped on the ground and the new item to replace it. [can i allocate this 2 certain slots?]
3) Extra: My map is a RPG where your hero is fully custom. At the start you can choose all your starting weapons and spells ans so on. The problem is buying new weapons because if i already have a weapon that has an attachment for my 'left,hand' and i buy a new weapon for my 'left,hand' it would look dumb carrying two weapons in one hand.
4) My also's: If this works out i would also like to know how to make it so if i pick up a weapon in the group of 'two handed' it will drop both my one handed weapons [left,hand and right,hand].

There are tons of ways to do this, but here's how I would do it.

You would need two sets of "weapons". One set of passive abilities that you can place in a spellbook ("equipment") which display the weapon on the hero, and one set of items which would display the weapon on ground as an item/on the shop.

Then you would need to script a detection system where, when you drop an item, it removed the ability and placed the corresponding item on the ground. And when you picked one up, it would give you the corresponding ability and remove the item from your inventory.

Giving you the illusion of having an armored character with the pieces of armor all viewable in a spellbook. Like the inventory screen in Diablo.

I would make the spellbook reflect your hero. Top mid = helm, Mid Mid = chest, Bot Mid = Boots. ETC. And have it where when you click on the spellbook item, it would drop the item to the ground and remove the ability. When you pick the item up, it would remove the item from your inventory and give you the corresponding ability. I would also make custom icons to spell out what slot is what. So you would have it say "HELM" in top mid, if there was nothing equipped.

Also use variables to store each piece of equipment's data. This way you could make a multiboard to show what pieces of gear you have to your allies/enemies and update it every few minutes or so- so the update was delayed.

It's a pain, but I think the end result would be amazing.
 
Level 2
Joined
Jan 24, 2008
Messages
10
There are tons of ways to do this, but here's how I would do it.

You would need two sets of "weapons". One set of passive abilities that you can place in a spellbook ("equipment") which display the weapon on the hero, and one set of items which would display the weapon on ground as an item/on the shop.

Then you would need to script a detection system where, when you drop an item, it removed the ability and placed the corresponding item on the ground. And when you picked one up, it would give you the corresponding ability and remove the item from your inventory.

Giving you the illusion of having an armored character with the pieces of armor all viewable in a spellbook. Like the inventory screen in Diablo.

I would make the spellbook reflect your hero. Top mid = helm, Mid Mid = chest, Bot Mid = Boots. ETC. And have it where when you click on the spellbook item, it would drop the item to the ground and remove the ability. When you pick the item up, it would remove the item from your inventory and give you the corresponding ability. I would also make custom icons to spell out what slot is what. So you would have it say "HELM" in top mid, if there was nothing equipped.

Also use variables to store each piece of equipment's data. This way you could make a multiboard to show what pieces of gear you have to your allies/enemies and update it every few minutes or so- so the update was delayed.

It's a pain, but I think the end result would be amazing.

ok i understand everything apart from scripting a detection system because i dont know how to script, this map would be amazing if i could get it running :mad:
 
Level 12
Joined
Mar 16, 2006
Messages
992
ok i understand everything apart from scripting a detection system because i dont know how to script, this map would be amazing if i could get it running :mad:

The detection thing- unfortunately I'm not at home- so I can't check the trigger names.

Basically you have a trigger that detects when an item is picked up. Then if that unit is a hero, and then if that ITEM_SLOT_# is currently filled. If it is filled, you drop whatever is currently in ITEM_SLOT_#, and give the unit the ability equal to the item picked up.

So if you pick up a Claymore, you remove the Item Claymore from the hero, and give the hero the ability Claymore. Which would give them the graphic and item bonus.

Then have a trigger where, when you cast the spell (to remove the item) or what have you, it removes the ability and drops the corresponding item to the ground. Removing the ability would remove the bonus and the graphic.

It requires a little bit of searching(for trigger names) and a whole lot of copy pasting(for each item) and filling in each seperate item's data, but I guess you know how awesome it would be to have this working in your map. =)
 
Level 12
Joined
Mar 16, 2006
Messages
992
vegevak, do you have msn? i would like to go indepth about this with you in an instantanious conversation rather than forums. my msn is [email protected]

Unfortunately I do not have MSN.

I'll see if I can come up with a base spell/trigger later.
I've been ridiculously busy fixing my map, so I can't guarantee anything.
 
Status
Not open for further replies.
Top