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

[JASS Request] Trigger to JASS

Status
Not open for further replies.
Level 4
Joined
Jul 3, 2006
Messages
61
Yeah bah ...
Currently I made a spell, and this one needs JASS, otherwise bugs will show up. I tryed to create it in JASS, but everytime I received errors, blabla, :( ..
Now I hope some others could help me with this little spell, here is the trigger. Thanks.

Code:
Time Trigger
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Time Trigger  for (Attacking unit)) Greater than 0
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random real number between 1.00 and 100.00) Less than or equal to 10.00
            Then - Actions
                Set TimeTriggerUnit[1] = (Attacking unit)
                Set TimeTriggerUnit[2] = (Attacked unit)
                Special Effect - Create a special effect attached to the overhead of TimeTriggerUnit[2] using Abilities\Spells\NightElf\FaerieFire\FaerieFireTarget.mdl
                Set TimeTriggerEffect = (Last created special effect)
                Wait 1.99 seconds
                Special Effect - Destroy TimeTriggerEffect
                Wait 0.01 seconds
                Special Effect - Create a special effect attached to the chest of TimeTriggerUnit[2] using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Set TimeTriggerEffect = (Last created special effect)
                Unit - Cause TimeTriggerUnit[1] to damage TimeTriggerUnit[2], dealing (50.00 x (Real((Level of Time Trigger  for TimeTriggerUnit[1])))) damage of attack type Spells and damage type Universal
                Set TimeTriggerUnit[1] = No unit
                Set TimeTriggerUnit[2] = No unit
                Special Effect - Destroy TimeTriggerEffect
            Else - Actions
                Do nothing
 
Status
Not open for further replies.
Top