1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. 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
  3. 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
  4. 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
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. 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.

Gaze of Medusa Spell v1.2

Submitted by OnGe
This bundle is marked as pending. It has not been reviewed by a staff member yet.
Turn enemies into stone. They will stay still forever... or until Medusa decide to break those statues because she dont like their look anymore.

Based on Charm with simple trigger to do the magic.

Updated to v1.2
v. 1.2
- removed variable - it was not needed in the end
- turning enemy to stone grants small amount of XP based on targets level
- spell can not target neutrals (so you will not waste mana on already petrified units). You may change it in object editor.
- fixed name change

v. 1.1
- statues now become buildings, so you can see them trough FoV
- statues have their defense changed to Fortified and armor to Stone so they will sound properly when attacked
- added some more victims to test on
- nerfed Medusas attack, so she will not kill creeps with arrows
- units turned to stone are renamed to "Petrified (unit name)"
- changed visual effect to something more reasonable
- modified trigger to be safer for multiplayer instances
Contents

Gaze of Medusa Spell (Map)

  1. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    1,063
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Welcome to the hive, first and foremost I'd recommend removing the default melee initialization and create a trigger to reveal the map:
    • Map Reveal
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Visibility - Disable fog of war
        • Visibility - Disable black mask

    I'd suggest you thumb through these:
    Memory Leaks
    Resource Submission Rules (Models, skins, icons, spells)
     
  2. OnGe

    OnGe

    Joined:
    Feb 3, 2020
    Messages:
    25
    Resources:
    0
    Resources:
    0
    Thanks for nice welcome. There is custom initialization in fact and fog of war is there to demonstrate statues acctualy dont see. I tried to place figurants close enough to be seen reasonably.
     
  3. JC Helas

    JC Helas

    Joined:
    Oct 19, 2014
    Messages:
    127
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Welcome to hive.

    Well all i can say is you have to use dynamic index instead of using wait which is unnecessary way, you have to imagine that ability could be in other unit and may use it at the same time.

    I highly recommend to use dynamic index
    Spend time from reading this link
    Visualize: Dynamic Indexing
     
  4. OnGe

    OnGe

    Joined:
    Feb 3, 2020
    Messages:
    25
    Resources:
    0
    Resources:
    0
    Thanks for comment. Dynamic indexing seems like overengineering to me, since this is targeted spell with (almost) instant effect. Wait is there to prevent original Charm spell effect to mess with trigger and Dynamic indexing would not help that.

    Anyway, I have changed it to be staticaly indexed (instanced in array indexed by casting unit owning player) so it should be pretty much safe for multiplayer now.

    Also, I have tweaked some effects and made statues to act more like statues.
     
  5. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,648
    Resources:
    1
    Spells:
    1
    Resources:
    1
    The spell can still fail if you group-cast the ability with multiple units or are extremely fast casting it an additional time during the wait. Waits have a minimum duration of ~0.27s so that will not be a 0.01. For that matter you could put a 0 wait and it would be the same duration. There are a few options I would recommend:
    • Don’t base the spell on Charm. Base it on Channel or something else, then you don’t have to worry about this and use the wait.
    • Use a locally shadowed global to store the unit during the wait: local udg_
    • Use a simple but clever GUI wait indexing method with 2 counter variables:
    • Set C1 = C1 + 1
    • Set UnitArray[C1] = the unit
    • Wait 0.00 seconds
    • Set C2 = C2 + 1
    • Unit - Kill UnitArray[C2]
    • If (All conditions are true) then do (Actions) else (Actions)
      • If - Conditions
        • C1 equal to C2
      • Then - Actions
        • Set C1 = 0
        • Set C2 = 0
      • Else - Actions
     
  6. OnGe

    OnGe

    Joined:
    Feb 3, 2020
    Messages:
    25
    Resources:
    0
    Resources:
    0
    Local variables seems like best solution to me right now. Thanks for that idea!

    About different base spell - is there something else than Charm and Hex what limits casting by level of target? Because this is what I see as key feature.
     
  7. OnGe

    OnGe

    Joined:
    Feb 3, 2020
    Messages:
    25
    Resources:
    0
    Resources:
    0
    In the end, I have realized I do not need variable at all and referencing to target of ability being cast will do the trick.

    I have updated spell with few more tweaks. I hope this is final one :)
     
  8. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,648
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Not that I am aware of, though you could simulate an error message and deny casting by checking the level yourself.