Complicated SFX Trigger

jpres

New Member
Reaction score
15
It might not seem very complicated, but to me it sure as hell is
I am trying to make it so when a unit picks up certain items, they act like costumes and change how the unit looks by making the current unit invisible, and adding a whole new model to the unit. Here's the code i'm using and it's failing miserably.

Code:
Set SFXNumber
    Events
        Map initialization
    Conditions
    Actions
        Set SFXNumber = 5
Code:
Gain Dragon Suit
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Fricken Awesome Dragon Suit Of Fastness
    Actions
        Animation - Change (Hero manipulating item)'s vertex coloring to (0.00%, 0.00%, 0.00%) with 100.00% transparency
        Wait 0.05 seconds
        Unit - Set the custom value of (Triggering unit) to SFXNumber
        Set SFX[SFXNumber] = (Last created special effect)
        Set SFXNumber = (SFXNumber + 1)
        Special Effect - Create a special effect attached to the overhead of (Hero manipulating item) using Units\Creeps\DragonSpawnPurple\DragonSpawnPurple.mdl
        Animation - Change (Hero manipulating item)'s size to (33.00%, 33.00%, 33.00%) of its original size
Code:
Lose Dragon Suit
    Events
        Unit - A unit Loses an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Fricken Awesome Dragon Suit Of Fastness
    Actions
        Animation - Change (Hero manipulating item)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
        Wait 0.05 seconds
        Special Effect - Destroy SFX[(Custom value of (Triggering unit))]
        Animation - Change (Hero manipulating item)'s size to (300.03%, 300.03%, 300.03%) of its original size

So what i'm trying to do is set a custom value for the unit the same # as the array for the special effect so it can just delete the special effect by the unit's value, but for some reason it's not working at all.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top