Help with spells

ReDruMMurDeR

Member
Reaction score
0
Cud someone help me Make a spell thats based off int

like i wud like forked lightning to deal 2x int x level of skill

thanks in advance
 

Necrach

You can change this now in User CP.
Reaction score
62
something like this
Trigger:
  • forked lightning
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Forked Lightning (a dummy target ability)
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to tempunitgroup
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set temppoint = (Position of (Target unit of ability being cast))
          • Set tempunitgroup2 = (Units within 400.00 of temppoint matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) is in tempunitgroup) Equal to False)))
          • Unit Group - Add (Random unit from tempunitgroup2) to tempunitgroup
          • Custom script: call DestroyGroup (udg_tempgroup2)
          • Custom script: call RemoveLocation (udg_temppoint)
      • Unit Group - Pick every unit in tempunitgroup and do (Actions)
        • Loop - Actions
          • Set temppoint = (Position of (Casting unit))
          • Set temppoint2 = (Position of (Picked unit))
          • Lightning - Create a Forked Lightning lightning effect from source temppoint to target temppoint2
          • Unit - Cause (Casting unit) to damage (Picked unit), dealing (2.00 x ((Real((Intelligence of (Casting unit) (Include bonuses)))) x (Real((Level of Forked Lightning for (Casting unit)))))) damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_tempgroup)
          • Custom script: call RemoveLocation (udg_temppoint)
          • Custom script: call RemoveLocation (udg_temppoint2)


EDIT: You might have to destroy the Lightning effect in some way, I can't remember if those get permanent :eek:
 

Ashlebede

New Member
Reaction score
43
temppoint & temppoint2 are point-type variables declared in the trigger editor using CTRL+B.

tempunitgroup2 & tempunitgroup are unit-group type variables declared in the same way.

Oh, and lightning effects do leak.

JASS:
call DestroyLightning(udg_TempLightningEffect)


If you don't destroy it, it'll remain forever. You'll have to store it in a variable and then destroy it with the above code.
 

ReDruMMurDeR

Member
Reaction score
0
i keep getting errors with custom script im not sure how to fix that

the errors with the script are
expected a name

fixed it does no damage tho

fixed the damage but it attacks the old point from first attack
 

Crimson

Member
Reaction score
3
i keep getting errors with custom script im not sure how to fix that

Do you put spaces between the RemoveLocation and the opening parenthesis? That could be why the custom scripts don't work.

I think it should be like RemoveLocation(udg_my_var)
 

Ashlebede

New Member
Reaction score
43
Do you put spaces between the RemoveLocation and the opening parenthesis? That could be why the custom scripts don't work.

I think it should be like RemoveLocation(udg_my_var)

Spaces don't matter in JASS. This is valid code :

JASS:
call    RemoveLocation        (      udg_my_var)       //lollerskates


Maybe you forgot the key-word [ljass]call[/ljass] or didn't add the prefix [ljass]udg_[/ljass] before your variable's name. Or that name just ain't the same as on your map. Oh, and remember they're case-sensitive.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top