[help]Trigger Spell

FoxWizzy

New Member
Reaction score
3
I am working on a new spell it's most trigger and i am stuck.
Trigger:
  • Next Dance
    • Events
      • Unit - A unit Starts the efect of an ability
    • Conditions
      • (Ability being cast) Equal to White Ripple
    • Actions
      • Unit - Create 1 Next Dance for Player 1 (Red) at (Point(-6207.00, 2228.00)) facing Default building facing(270.0) degrees
      • Set Units[40] = (Last created unit)
      • Set dis[0] = (Distance between (Position of (Target unit of ability being cast)) and (Position of Units[40]))
      • Unit - Order Units[40] to Attack (Target unit of ability being cast)
      • Set Units[42] = (Target unit of ability being cast)
      • Trigger - Turn on Next Dance 2 <gen>


Trigger:
  • Next Dance 2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • dis[0] Less than of equal to 200.00
    • Actions
      • Unit - Cause Units[40] to damage Units[42], dealing dis[0] damage of attack type Spell and damage type normal
      • Unit - Remove Units[40] from the game


Problem : Deals NO DAMAGE and unit 40 is not removed
 

reyghost

New Member
Reaction score
14
Yes but the dis[0] is the distance between the point you set and the position of the target unit,if this distance is larger than 200 at the begininh of the spell trigger 2 condition wil never be met are you sure dis[0] is less than 200 a the begining?
Because the trigger seems ok.
 

FoxWizzy

New Member
Reaction score
3
....ok...how do i fix that? as the target of the ability is mobile but the units[40] is not
 

reyghost

New Member
Reaction score
14
I dont really know how your spell works, what is this (Point(-6207.00, 2228.00)) ??
why create the units there ?
 

FoxWizzy

New Member
Reaction score
3
The target unit of the ability is going to take 3 damages :
1) from the caster unit (fixed damage)
2) from units[40]
3) from units[41]

1 is units[40] and 2 is units[41]
 

Attachments

  • untitled.JPG
    untitled.JPG
    171.3 KB · Views: 125

reyghost

New Member
Reaction score
14
So,"(Point(-6207.00, 2228.00)) " is that 1 you have in that image?
Assuming it is,I dont really understand the spell ,lets say the target unit is inside the yellow box of your image,the distance between its position and the position of 1 is obviously higher than 200 and therefore you 2nd trigger wont run at all.
This spell is only valid when the target unit is within 200 of the position 1.
Also that condition you wrote is not dinamic at all, if in the begining dis[0] is bigger than 200 the periodic trigger will run endlessly as dis[0] is set value and is not updated.
Do you understand ?
 

reyghost

New Member
Reaction score
14
If you want to check dis[0] every time the trigger runs just remove that condition.
and do it in actions:

if/then/else

In the conditions use just the same condition you used.

In "then actions" use the 2 actions you already have plus these:
-set the position of units[40] and units [42] to point variables.
-set dis[0] to distance between those 2 point variables.
-remove the leaks with the custom scripts to avoid leaks.

In "else actions" do whatever you want to happen if the distance becomes more than 200.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top