Need Spell Help

Ultramen

Cool Member
Reaction score
3
Hey, i tryed to make a spell that if u alternate the left and right arrow keys then you damage every opponents unit&hero near 300. I need alot of help plz
Code:
Spell
Events
   Unit - A unit starts an a effect of an a Ability
Conditions
   (Ability Being Cast) Equal to Spell
Actions
    Set Caster = (Casting Unit)
    Set EffectPoint = (Position of Caster offset by 500
    Unit - Pause Caster
    Set EffectIsOn = True
    Turn on Spell Effect
    Wait 5 Seconds
    Turn off Spell Effect
    Set EffectIsOn = False
    Custom Script:   call RemoveLocation(udg_EffectPoint)
    Unit - Unpause Caster

Code:
    Spell Effect
Events
     Owner of Caster presses the Left Arrow Key
     Owner of Caster presses the Right Arrow Key
Conditions
     EffectIsOn equal to True
Actions
     Special Effect - Create Special Effect at the origin of Caster using Thunder Clap [sorry, dont have WE opened]
     Set EffectModel = (Last Created Special Effect)
     Unit - Cause Caster to Damage Units within EffectPoint dealing 20 Damage of damage type Normal and Type Hero
     Wait 1 Seconds
     Special Effect - Destroy Last Created Special Effect.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Change Set Caster = (Triggering Unit)
Might not do much but still
EDIT: And could you please open WE and Copy the text instead?
 

Cheddar

This is the way it was meant to be.
Reaction score
126
It doesnt work for me.

To steal AceHart's famous quote:

"It does not work is not a good problem description"

The trigger activated by pressing the arrow keys will activate even if I spam the left arrow key... muchos bug abuses.

Create two seperate triggers. One is activated by the Left Arrow key, one the Right. When the one activated by the left goes off, turn it off and turn on the Right Arrow one. Likewise, when the Right Arrow key is pressed, turn off that trigger and activate the Left Arrow one. This prevents key spamming because the trigger firing for your spammed key will turned off, so the player is forced to alternate. At the end, turn off both triggers.

Oh, and you don't have to set EffectModel into a variable. You can just create the art and destroy it, and the entire animation will show.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top