1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Special effects on items on the ground

Discussion in 'World Editor Help Zone' started by Chizume, Aug 8, 2012.

  1. Chizume

    Chizume

    Joined:
    May 26, 2009
    Messages:
    593
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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?
     
  2. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    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.
     
  3. KhaosMachine

    KhaosMachine

    Joined:
    Dec 30, 2011
    Messages:
    117
    Resources:
    6
    Spells:
    6
    Resources:
    6
    Well, you can use HASHTABLES for it, save an effect at item handle id and destroy it when a hero aquires the item o the item die.. :DPD:pD
     
  4. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    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.
     

    Attached Files:

  5. Chizume

    Chizume

    Joined:
    May 26, 2009
    Messages:
    593
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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?
     
  6. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Okay I updated a condition there, it should not create SFX any longer if items are given in-between units.
     

    Attached Files: