A few questions, will give rep.

und34d-rul3

New Member
Reaction score
12
1) I have a trigger that creates a dummy unit to cast chain lightning, but it doesn't seem to work at all.
Code:
Lightning
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Lightning
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit - Create 1 Dummy for (Player((Integer A))) at (Target point of issued order) facing Default building facing degrees
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                LightningLevel[(Integer A)] Greater than or equal to 1
                            Then - Actions
                                Unit - Set level of Chain Lightning for (Last created unit) to LightningLevel[(Integer A)]
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
                                Unit - Remove (Last created unit) from the game
                            Else - Actions
                    Else - Actions
This is supposed to detect when lightning (an auto cast ability) is casted and then create a dummy unit to cast whatever level of chain lightning is researched by the player (I set that in another trigger) and then cast it. I think the problem may be the "Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)"; I couldn't find where to choose the exact spell to cast it.


2) I modified inner fire to add no bonus damage and to target enemies and not allies, and I got rid of all buffs, animations and sounds. I am using this in the previous trigger as an auto cast ability, but my problem is that it is still giving the Inner Fire buff, even though I removed it from the "Stats - Buffs".
 

X-maul

AKA: Demtrod
Reaction score
201
1)
first of all, use the event: a unit starts the effect of an ability, i'll prefer to use that for myself....

and if your ability is an unit target ability, i think that it should be "position of target unit of ability being cast" and if not, if its just an ground target ability, it should be "target point of ability being cast"

were do you set that LightningLevel variable, the spell should only work if it higher than or equal to, but it isnt set to anything...

2)
well, you could use the ability "Channel" and then just make it target units... then it add no buffs... or you could create an buff that got no image, and add it to your ability... :)
 

cleeezzz

The Undead Ranger.
Reaction score
268
im just wondernig why you didn't use the way vypur suggested in your other thread, give the tower low damage like 1, and just detect when a unit is attacked by a lightning tower and cast the lighting.

anyway, Inner fire is a unit cast so Target of ability cast is right. You cant cast chain lighting at the position of cast point because chain lightning is a unit target skill
 

manofsteel

New Member
Reaction score
36
Put this: ->position of target unit of ability being cast<-
into a point-variable so that it don`t leak:
Code:
Actions
    Set A = (Position of (Target unit of ability being cast))
And then remove it at the bottom of the trigger:
Code:
Custom script:   call RemoveLocation (udg_A)
 

DarkSonicele

New Member
Reaction score
20
1)
Code:
Lightning
    Events
        Unit - A unit [COLOR="Red"]Begins casting an ability[/COLOR]
    Conditions
        (Ability being cast) Equal to Lightning
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit - Create 1 Dummy for (Player((Integer A))) at [COLOR="Red"](Target point of issued order)[/COLOR] facing Default building facing degrees
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                LightningLevel[(Integer A)] Greater than or equal to 1
                            Then - Actions
                                Unit - Set level of Chain Lightning for (Last created unit) to LightningLevel[(Integer A)]
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
                               [COLOR="Red"] Unit - Remove (Last created unit) from the game[/COLOR]
                            Else - Actions
                    Else - Actions

First of, use "Starts the effect of an ability"
Second thing, change "Target point of issued order" to "Position of (Target unit of ability being cast)"
Third thing, you don't give the dummy enough time to cast the spell. Change "Unit - Remove (Last created unit) from the game" to "Unit - Add a 1.00 second Generic expiration timer to (Last created unit)"

-DarkSonicele

Btw, remember to add your chain lightning spell to the dummy if it doesn't already have, and you can also add "Position of (Target unit of ability being cast)" to a variable as manofsteel pointed out.
 

DeathWing

New Member
Reaction score
3
1) I have a trigger that creates a dummy unit to cast chain lightning, but it doesn't seem to work at all.
Code:
Lightning
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Lightning
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit - Create 1 Dummy for (Player((Integer A))) at (Target point of issued order) facing Default building facing degrees
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                LightningLevel[(Integer A)] Greater than or equal to 1
                            Then - Actions
                                Unit - Set level of Chain Lightning for (Last created unit) to LightningLevel[(Integer A)]
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
                                Unit - Remove (Last created unit) from the game
                            Else - Actions
                    Else - Actions
This is supposed to detect when lightning (an auto cast ability) is casted and then create a dummy unit to cast whatever level of chain lightning is researched by the player (I set that in another trigger) and then cast it. I think the problem may be the "Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)"; I couldn't find where to choose the exact spell to cast it.


2) I modified inner fire to add no bonus damage and to target enemies and not allies, and I got rid of all buffs, animations and sounds. I am using this in the previous trigger as an auto cast ability, but my problem is that it is still giving the Inner Fire buff, even though I removed it from the "Stats - Buffs".

First:(Target point of issued order) ---> Order is "Cast spell: Lighting"
Second: (Target unit of ability being cast) ----> Ability is also Lighting

Both of thoose things refer to ability "Lighting" - I'm sure it can't be point-target and single-target at once so I think that might be your problem.
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Everything is fine except your unit is being removed to quickly.
Do what someone suggested earlier and just add an expiration timer. And remove the remove unit action.


EDIT:
Code:
(Target point of issued order)
Should be:
Code:
Position of (Target unit of ability being cast)
 

und34d-rul3

New Member
Reaction score
12
Code:
Lightning Research
    Events
        Unit - A unit Finishes research
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Researched tech-type) Equal to Lightning 
            Then - Actions
                Set LightningLevel[(Player number of (Owner of (Triggering unit)))] = (LightningLevel[(Player number of (Owner of (Triggering unit)))] + 1)
            Else - Actions
                Do nothing
THeres the code that adds to LightningLevel


Im going to try what DarkSonicele said first, oh and do you think this will create a memory leak? Should I use variables? Cause I thought you needed to use variables to have memory leaks.



Ok, for the most part it worked (+rep DarkSonicele), but now I have a few more problems

1) Innerfire is still adding the innerfire buff o_O ><
2) Innerfire, even though it is on auto cast and has enemy as choice for targets (I can manually click it), won't autocast on the enemy targets.
 

manofsteel

New Member
Reaction score
36
1.Set the duration to something low like 0.01 that should do it.
2. Use Curse, it`s enemy targeting.
 

luke20054

New Member
Reaction score
3
1) Innerfire is still adding the innerfire buff o_O ><
2) Innerfire, even though it is on auto cast and has enemy as choice for targets (I can manually click it), won't autocast on the enemy targets

Simple:
1)
Unit - Remove Inner Fire buff from (Target unit of ability being cast)
2)
Player - For Player 1 (Red), turn Alliance (non-aggression) On toward Player 2 (Blue) I'm almost certain the answer lie's in there somewhere:cool:
 
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