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

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 33
Joined
Mar 27, 2008
Messages
8,035
You are indeed can't attach SFX to an item, although you can attach SFX to the ground location of that item, that could work too, right ?

Try this test map.

This system is perfectly MUI, don't care about the Wait.
 

Attachments

  • Simple Item SFX System.w3x
    13.2 KB · Views: 29
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