"Spell doesn't work" - GUI

spectre37

New Member
Reaction score
1
I want to create spell that have chance to start effect when casting other spell. but it doesn't work when cast some spell.

first spell is moonfire

Code:
Moonfire
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Moonfire 
    Actions
        Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing (Target point of ability being cast)
        Unit - Add [COLOR="red"]Moonfire (Dummy)[/COLOR] to (Last created unit)
        Unit - Set level of [COLOR="red"]Moonfire (Dummy)[/COLOR] for (Last created unit) to (Level of [COLOR="red"]Moonfire[/COLOR]  for (Casting unit))
        Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire (Target unit of ability being cast)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

second effect is when cast first spell or other, have chance to blast random point around target unit.

Code:
Eclipse
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Level of Eclipse  for (Casting unit)) Greater than 0
    Actions
        Unit - Set the custom value of (Casting unit) to (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Casting unit)) Less than or equal to (((Level of Eclipse  for (Casting unit)) + 1) x 10)
            Then - Actions
                For each (Integer A) from 1 to (Random integer number between 3 and 5), do (Actions)
                    Loop - Actions
                        Wait 0.20 seconds
                        Unit - Create 1 [COLOR="red"]Eclipse[/COLOR] for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by ((Random real number between -125.00 and 125.00), (Random real number between -125.00 and 125.00))) facing (Position of (Target unit of ability being cast))
            Else - Actions

can someone help??
 

Flare

Stops copies me!
Reaction score
662
1) Is Moonfire point-targetable or unit-targetable? There's no Target Point of Ability Being Cast if it's unit-targeted I think, which could be the problem there

2) I think Casting Unit and Target Unit of Ability Being cast can be lost after waits - replace Casting Unit with Triggering Unit (it's much more stable) and store Target Unit of Ability Being Cast in a variable, and refer to that when spawning the dummy
 

Manix

Well-Known Member
Reaction score
29
I want to create spell that have chance to start effect when casting other spell. but it doesn't work when cast some spell.

first spell is moonfire

Code:
Moonfire
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Moonfire 
    Actions
        Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing (Target point of ability being cast)
        Unit - Add [COLOR="red"]Moonfire (Dummy)[/COLOR] to (Last created unit)
        Unit - Set level of [COLOR="red"]Moonfire (Dummy)[/COLOR] for (Last created unit) to (Level of [COLOR="red"]Moonfire[/COLOR]  for (Casting unit))
        Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire (Target unit of ability being cast)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

second effect is when cast first spell or other, have chance to blast random point around target unit.

Code:
Eclipse
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Level of Eclipse  for (Casting unit)) Greater than 0
    Actions
        Unit - Set the custom value of (Casting unit) to (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Casting unit)) Less than or equal to (((Level of Eclipse  for (Casting unit)) + 1) x 10)
            Then - Actions
                For each (Integer A) from 1 to (Random integer number between 3 and 5), do (Actions)
                    Loop - Actions
                        Wait 0.20 seconds
                        Unit - Create 1 [COLOR="red"]Eclipse[/COLOR] for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by ((Random real number between -125.00 and 125.00), (Random real number between -125.00 and 125.00))) facing (Position of (Target unit of ability being cast))
            Else - Actions

can someone help??

Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing (Target point of ability being cast)
Unit - Add Moonfire (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire (Target unit of ability being cast)

How do you expect that to happen, also

Then - Actions
For each (Integer A) from 1 to (Random integer number between 3 and 5), do (Actions)
Loop - Actions
Wait 0.20 seconds
Unit - Create 1 Eclipse for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by ((Random real number between -125.00 and 125.00), (Random real number between -125.00 and 125.00))) facing (Position of (Target unit of ability being cast))

do not use waits in loops

+ both of your triggers leak
 

Manix

Well-Known Member
Reaction score
29
new trigger with event every X seconds of game time, disable it in an initialization trigger and when the spell is activated enable it, and disable it again when the spell is over or something..
 
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