• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Special Effects: Adding/Removing/Replacing Attachments

Status
Not open for further replies.
Level 25
Joined
Mar 25, 2004
Messages
4,880
I want to try triggering an attachment system for Wc3:WoW, but I cannot even figure out how to add an attachment to the unit and take it away or replace it after I've made another attachment. So lets say my hero aquires a Helm of Kings, I want a helmet model (customly imported of course) to be attached to the hero's head and when item is dropped, it is removed. This is easy to do. But it gets hard and confusing for me once I add another trigger that is activated when another item is aquired. So lets say I've already aquired the helmet, now I've picked up another item: Claws of Attack +6 (Sword attachment to Right Hand) and I want the sword attachment to be removed when Claws of Attack +6 is dropped. But I don't know how to do this because I can only remove "Last Created Attachment"
I know I need variables and probably some other Actions, but not sure which to do or how to do them.
Please help me out here. :)
-Craka_J
 
Level 2
Joined
Jun 10, 2007
Messages
19
An Easy way to do it is to make all shields an item type, (E.g- Artifact) And make no other items Artifacts.When he gets the item make him drop it and say you can not have two Shields at the same time. I was making a runescape map where all of the items dont really do anything until you use an ability by them which looks like an ability in a spell book that looked like armor. It would be hard but a great add on!
 
Level 1
Joined
Jul 11, 2007
Messages
2
Just easy

For making a system that only allows 1 type of weapon armor gloves shield etc etc... you just need to make 2 simple triggers for every player.

But first you have to set up the item types... for example making all waepons an artifact via object editor.

After that make a variable named DoubleWeapon as an integer array[1]

Then start with the first weapon deny trigger... it looks like this one:

trigger1.png


This trigger will let you pick up 1 weapon and after that it sets the created variable to 1.
If he try to equip a second weapon now, then he will drop the newly aquired weapon immediately to the floor and a text will say that he only can wear 1 weapon.

After this one write a second trigger to allow equip a weapon again if he have dropped his first weapon...

trigger2.png


thats it already easy hmm ?

but it have 2 little disadvantages:
-The first is you have to create for every player 2 new triggers
-The second is that you only have 6-7 item types you can set for different
kinds of weapons...

Remember to set the variable DoubleWeapons for every player:
Example:
Red: DoubleWeapons[1]
Blue: DoubleWeapons[2]
Teal: DoubleWeapons[3]
Purple: DoubleWeapons[4]
etc...
 
Level 7
Joined
Apr 23, 2007
Messages
326
item way is quicker like pyrite said and you could put the attachment in the armor bonus ability for crown of kings so you dont even have to make a second ability from shere
 
Status
Not open for further replies.
Top