Just a little spell help

T-Bonety

New Member
Reaction score
2
Hey thanks to anyone who takes their time to look at this my question is pretty noob but here it is.

You know when you have an ability lets say for this case. Fire. And you want the spell to deal Hero's Strength x 2, i have that part figured out but where i get stuck is when they level the ability up that i can change the trigger accordingly.

like so when they level up Fire - [Level 1] to Fire -[Level 3], 4, 5 etc.

How can i change the trigger to make it say 4x his strength for level 2 and 8x his strength for level 3 etc. etc.

Thanks to anyone who helps me out.

Trigger:
  • Fated Circle
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Fated Circle
    • Actions
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 90.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle1 = (Last created unit)
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 180.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle2 = (Last created unit)
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 360.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle3 = (Last created unit)
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 270.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle4 = (Last created unit)
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 135.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle5 = (Last created unit)
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 225.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle6 = (Last created unit)
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 315.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle7 = (Last created unit)
      • Unit - Create 1 dummy fated for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards 45.00 degrees) facing (Position of (Triggering unit))
      • Set FatedCircle8 = (Last created unit)
      • Unit - Cause FatedCircle1 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle1), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Cause FatedCircle2 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle2), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Cause FatedCircle3 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle3), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Cause FatedCircle4 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle4), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Cause FatedCircle5 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle5), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Cause FatedCircle6 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle6), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Cause FatedCircle7 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle7), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Cause FatedCircle8 to damage circular area after 0.00 seconds of radius 150.00 at (Position of FatedCircle8), dealing ((Real(SquallStr)) x 2.00) damage of attack type Spells and damage type Normal
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle1
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle2
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle3
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle4
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle5
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle7
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle6
      • Unit - Add a 2.00 second Generic expiration timer to FatedCircle8


Just in case you dont understand my question here is the trigger.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
If you don't like the wait just remove it
Trigger:
  • aba
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fated Circle
    • Actions
      • Set Level = (Real((Level of Fated Circle for (Triggering unit))))
      • Set Damage = (Power(2.00, Level))
      • For each (Integer Multiplier) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Position = (Position of (Triggering unit))
          • Set Degree = ((Real(Multiplier)) x 45.00)
          • Unit - Create 1 dummy fated for (Triggering player) at (Position offset by 250.00 towards Degree degrees) facing (Position)
          • Custom script: call RemoveLocation(Position)
          • Set Position = (Position of (Last created unit))
          • Unit - Cause (Last created unit) to damage circular area after 0.50 seconds of radius 150.00 at Position, dealing Damage damage of attack type Spells and damage type Magic
          • Custom script: call RemoveLocation(Position)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Wait 0.25 seconds
 

Moridin

Snow Leopard
Reaction score
144
Your trigger is essentially this:

Assuming:
Level 1 = 2x his strength
Level 2 = 4x his strength
Level 3 = 8x his strength
...

Trigger:
  • Fated Circle
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Fated Circle
    • Actions
      • For each (Integer A) from 1 to 8 do Actions
        • Unit - Create 1 dummy for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards (45.00 x (Integer A)) degrees) facing (Position of (Triggering unit))
        • Unit - Cause (last created unit) to damage circular area after 0.00 seconds of radius 150.00 at (Position of (last created unit)), dealing ((Real(SquallStr)) x (2.00 ^ (Level of Fated Circle for (Triggering unit))) damage of attack type Spells and damage type Normal
        • Unit - Add a 2.00 second Generic expiration timer to (last created unit)
 

tommerbob

Minecraft. :D
Reaction score
110
Trigger:
  • Set TempPoint = (Position of (Triggering unit)
    • Loop - For each (Integer A) from 1 to 8 Do Actions:
      • Create 1 dummy fated for (Triggering unit) at TempPoint
      • Set FatedCircle[Integer A] = (last created unit)
      • Unit - Cause FatedCircle[Integer A] to damage circular area after 0.00 seconds of radius 150.00 at TempPoint, dealing ((Real(SqualStr)) x 2.00) of attack type spells and damage type normal
      • Unit - Add a 2.00 second generic expiration timer to FatedCircle[Integer A]


I cleaned up your trigger somewhat. I stuck what you just did inside a loop. I didn't change the damage though, or the position of the dummy casters.

EDIT: Aww Moridin you beat me to it! <--- Follow his trigger. :p
 

Moridin

Snow Leopard
Reaction score
144
Hahaha :p. You do realise you don't need integer A for the later actions right? You don't even need to save the unit in a variable :p.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
hey have you seen my trigger? I am first and I beat ya!!!! :shades::shades::shades: and no leaks and he can move freely during the effect of the ability
 

Moridin

Snow Leopard
Reaction score
144
Well you're right that your trigger doesn't have leaks. At the same time you added unneccesary variables and a wait for some reason :S, making it non-MUI.

I also find it very childish that you went back and edited your trigger half an hour after tommerbob posted just so you could say "yay I'm first".
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
I went to toilet during writing the trigger, so I wrote it 30 mins later.I wrote how to to make it better, but then I realized that a trigger would definitely be better


Edit: there are no unnecessary variables, there are configurables or something like that
 

Ayanami

칼리
Reaction score
288
@ NoobImbaPro
Why do you want to be the first? Do you want rep so badly? For what reason? And your trigger is not leakless. Your offset leaks. Red part is where it leaks.

Code:
Unit - Create 1 dummy fated for (Triggering player) at [COLOR="Red"][B](Position offset by 250.00 towards Degree degrees)[/B][/COLOR] facing (Position)

Your code won't even compile for that matter.

Trigger:
  • Custom script: RemoveLocation(Position)


This would give you errors when saving. Position is a global variable. Thus, you need a udg_ prefix. This would work.

Trigger:
  • Custom script: RemoveLocation(udg_Position)



You really shouldn't deal damage using "Circular Radius" action as it deals damage to all units, allies and enemies alike. Use a temporary unit group and deal damage instead.

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fated Circle
    • Actions
      • Set TempReal = 0.00
      • Set RealDamage = (Power(2.00, (Real((Level of Fated Circle for (Triggering unit))))))
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set TempReal = (TempReal + 45.00)
          • Set TempPoint = (Position of (Triggering unit))
          • Set TempOffset = (TempPoint offset by 250.00 towards TempReal degrees)
          • Set TempUnitGroup = (Units within 150.00 of TempOffset) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True))))
          • Unit - Create 1 dummy fated for (Triggering player) at TempOffset facing TempPoint
          • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing RealDamage damage of attack type Spells and damage type Magic
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: DestroyGroup(udg_TempUnitGroup)
          • Custom script: RemoveLocation(udg_TempOffset)
          • Custom script: RemoveLocation(udg_TempPoint)


This would damage all enemies within 150 area of the position of the created unit and only deal damage to non-structure enemy units.
 

T-Bonety

New Member
Reaction score
2
Your trigger is essentially this:

Assuming:
Level 1 = 2x his strength
Level 2 = 4x his strength
Level 3 = 8x his strength
...

Trigger:
  • Fated Circle
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Fated Circle
    • Actions
      • For each (Integer A) from 1 to 8 do Actions
        • Unit - Create 1 dummy for (Triggering player) at ((Position of (Triggering unit)) offset by 250.00 towards (45.00 x (Integer A)) degrees) facing (Position of (Triggering unit))
        • Unit - Cause (last created unit) to damage circular area after 0.00 seconds of radius 150.00 at (Position of (last created unit)), dealing ((Real(SquallStr)) x (2.00 ^ (Level of Fated Circle for (Triggering unit))) damage of attack type Spells and damage type Normal
        • Unit - Add a 2.00 second Generic expiration timer to (last created unit)

Thanks for your time but i cant find the 45 x Interger A part or the 2.00 ^ level of fated circle part in any of the triggers

@ NoobImbaPro
Why do you want to be the first? Do you want rep so badly? For what reason? And your trigger is not leakless. Your offset leaks. Red part is where it leaks.

Code:
Unit - Create 1 dummy fated for (Triggering player) at [COLOR="Red"][B](Position offset by 250.00 towards Degree degrees)[/B][/COLOR] facing (Position)

Your code won't even compile for that matter.

Trigger:
  • Custom script: RemoveLocation(Position)


This would give you errors when saving. Position is a global variable. Thus, you need a udg_ prefix. This would work.

Trigger:
  • Custom script: RemoveLocation(udg_Position)



You really shouldn't deal damage using "Circular Radius" action as it deals damage to all units, allies and enemies alike. Use a temporary unit group and deal damage instead.

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fated Circle
    • Actions
      • Set TempReal = 0.00
      • Set RealDamage = (Power(2.00, (Real((Level of Fated Circle for (Triggering unit))))))
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set TempReal = (TempReal + 45.00)
          • Set TempPoint = (Position of (Triggering unit))
          • Set TempOffset = (Position offset by 250.00 towards TempReal degrees)
          • Set TempUnitGroup = (Units within 150.00 of TempOffset) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True))))
          • Unit - Create 1 dummy fated for (Triggering player) at TempOffset facing TempPoint
          • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing RealDamage damage of attack type Spells and damage type Magic
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: DestroyGroup(udg_TempUnitGroup)
          • Custom script: RemoveLocation(udg_TempOffset)
          • Custom script: RemoveLocation(udg_TempPoint)


This would damage all enemies within 150 area of the position of the created unit and only deal damage to non-structure enemy units.

Also yours just doesnt work for me not sure why though
 

Moridin

Snow Leopard
Reaction score
144
You have to use Arithmetic. It will give you the option of:

_____ + ______

Then you can change the first value to 45, the sign into "x" and the second value to "For loop integer A".

Also, the ^ implies to the power of. It should be under math functions.
 

T-Bonety

New Member
Reaction score
2
You have to use Arithmetic. It will give you the option of:

_____ + ______

Then you can change the first value to 45, the sign into "x" and the second value to "For loop integer A".

Also, the ^ implies to the power of. It should be under math functions.

Thank You very much spell works perfectly now and ill be able to base all my other spells after it +rep !!
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
@glenphir yeah I want it so badly that I missed that leak, and after writing in vJass for more than a year I missed that you have to place the udg_ prefix and the other one with the position.
I am too close at +50 rep and plz don't -rep me for CHILDISH reasons...!!!
I know I my behavior was moronic but none doesn't make mistakes, ok???
 

Ayanami

칼리
Reaction score
288
@glenphir yeah I want it so badly that I missed that leak, and after writing in vJass for more than a year I missed that you have to place the udg_ prefix and the other one with the position.
I am too close at +50 rep and plz don't -rep me for CHILDISH reasons...!!!
I know I my behavior was moronic but none doesn't make mistakes, ok???

But you learn from your mistakes, and then you don't repeat it. That's different.

Anyways, glad that you got your answer T-Bonety. Just remember to remove your location leaks, group leaks, etc.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
Man I know very well what to do, I am noob now i am imba :p, and I know all leak types and how to remove them....
 
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