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

[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