• 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.

Special effects on items on the ground

Status
Not open for further replies.
Level 11
Joined
May 26, 2009
Messages
760
Hello,

My map will contain a variety of items; up to 200 items of about 30 types. What I would like to do is attach a special effect on the items when they are on the ground. I don't want any effect when its carried/picked up. Once an item is placed on the ground again it should regain its special effect. It is the same effect for every item but I only want it to show on items in certain (2) categories.

Items appear to not care about attachment points.

I have searched the hive and thought of various ways to do this but cannot come up with any solution. Any ideas?
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Have an array that holds each item, an array that holds each special effect, and an integer index system.

Keep track of each item's index using its hit points (I'm assuming you won't need item hit points for anything else in the map).

When an item is dropped, a special effect is created at the position of the item, and the corresponding special effect variable is set to the created effect, using the item's hit points as the index number. When an item is picked up, destroy the corresponding SFX.

Good luck, and let me know if I need to explain that better.
 
Level 11
Joined
May 26, 2009
Messages
760
That's absolutely excellent!

Thanks a lot, defskull.

EDIT: A minor issue that is probably my own fault for not mentioning. When giving items between units the effects come back at their last known locations. I'm not certain how to put conditions for this in your triggers?
 
Status
Not open for further replies.
Top