Ability trigger doesn't work

Varedis

New Member
Reaction score
0
What's wrong with my trigger?

Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Coruption
Actions
Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
Unit - Replace (Ownership-changed unit) with a Queen of Suffering using The new unit's default life and mana

My ability has to change a creep into a Queen of suffering and make it mine, but the problem is that when I use the trigger: Finishes casting an ability, it doesn't work, it just shows the art effects and nothing happens, but when I use: Begins casting an ability, the trigger works, but the art effects don't work, the creep just turn instantly into a queen of suffering.

that's my first problem, if u can't fix that one, then fix this one.


There's an ability in Warcraft 3 called Dark Conversion, the one used in purging Stratholme, what do you call the zombie the commoner is conversed into? Summoned unit or what? I used evrything, even Replaced unit but still the triggered didn't work.
trigger:

Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Dark Conversion
Actions
Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color

same problem here: if I use finishes casting an ability, the queen of suffering (I replaced zombie with queen of suffering in Object Editor) isn't mine, the trigger doesn't work, but if I use begins casting an ability, the queen of suffering is mine, but the unit has no skills at all :S, even if I add new skills to the queen of suffering, it doesn't show them when I conversed a creep into her.

I tried to use the trigger:

Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Corruption
Actions
Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
Unit - Add Avatar to (Ownership-changed unit)

but it doesn't work, the creep get the ability avatar but when the creep turns into the queen of suffering, all abilities are gone, even avater, I don't know what to call the queen of suffering so I can't add the ability with a trigger to her.




Can anyone fix my problem
 
Welcome to thehelper!

Try with "Starts the effect of an ability" and see if it works. If it don't, tell me! :eek:

EDIT: Also, you might want to change triggering unit to casting unit. And check some tutorial about leaks in GUI!
 
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Coruption
Actions
Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
Unit - Replace (Ownership-changed unit) with a Queen of Suffering using The new unit's default life and mana
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Coruption
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
      • Unit - Replace (Target unit of ability being cast) with a Queen of Suffering using The new unit's default life and mana

This could work, Starts the effect of an ability is better and can't be abused.
And I believe that (Ownership-changed unit) only works if your event would've been:
Trigger:
  • Events
    • Unit - A unit Changes owner


Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Corruption
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
      • Unit - Add Avatar to (Target unit of ability being cast)

I think that should work for this one as well.

I'm sorry I don't have time to type my usual detailed 5 pages long stories. Let me know if it doesn't work.
 
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Coruption
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
      • Unit - Replace (Target unit of ability being cast) with a Queen of Suffering using The new unit's default life and mana

This could work, Starts the effect of an ability is better and can't be abused.
And I believe that (Ownership-changed unit) only works if your event would've been:
Trigger:
  • Events
    • Unit - A unit Changes owner


Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Corruption
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
      • Unit - Add Avatar to (Target unit of ability being cast)

I think that should work for this one as well.

I'm sorry I don't have time to type my usual detailed 5 pages long stories. Let me know if it doesn't work.

It did work, only the ability adding part, because the trigger adds avatar to the target of unit of ability being cast, but my target gets converted into something else, that something else isn't Target unit of ability being cast, and if my target gets converted it loses all his skills, if you can tell me what to call my queen of suffering (it isn't target unit of ability being cast, nor replaced unit) I can add the ability to the queen of suffering.

EDIT: spell is based on dark conversion, you should check it.
 
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Coruption
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
      • Unit - Replace (Target unit of ability being cast) with a Queen of Suffering using The new unit's default life and mana

This could work, Starts the effect of an ability is better and can't be abused.
And I believe that (Ownership-changed unit) only works if your event would've been:
Trigger:
  • Events
    • Unit - A unit Changes owner


Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Corruption
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
      • Unit - Add Avatar to (Target unit of ability being cast)

I think that should work for this one as well.

I'm sorry I don't have time to type my usual detailed 5 pages long stories. Let me know if it doesn't work.

I tested your first option, it did work, only problem is, I want the creep to turn into queen of suffering after the missle art hit, not before, can u fix that for me,
 
First of all, please watch the double post; some people will give rep- for that and stuff.

I want the creep to turn into queen of suffering after the missle art hit, not before, can u fix that for me,
I will admit it... I'm not sure. You could add a short wait based on the distance between caster and target. Just make sure to save (Target unit of ability being cast) in a variable because it will be overwriten by other single target abilities cast during the wait.
This however will make it non-MUI, or 1 per player MUI or however you'd call it if you add an array to it.

EDIT: spell is based on dark conversion, you should check it.
A bit of a confusing spell. I wonder if the replacing unit would still count as a (Target Unit of Ability being cast).

It did work, only the ability adding part, because the trigger adds avatar to the target of unit of ability being cast, but my target gets converted into something else, that something else isn't Target unit of ability being cast, and if my target gets converted it loses all his skills, if you can tell me what to call my queen of suffering (it isn't target unit of ability being cast, nor replaced unit) I can add the ability to the queen of suffering.
Well, you could try again using (Replaced unit) again, maybe it'll work this time. A different methode would be:
Trigger:
  • Actions
    • Set Unit_Group = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to Queen of Suffering) and ((Level of Avatar for (Matching unit)) Equal to 0)))
    • Unit Group - Pick every unit in Unit_Group and do (Actions)
      • Loop - Actions
        • Unit - Add Avatar to (Picked unit)
    • Custom script: call DestroyGroup (udg_Unit_Group)

Place that at the end of the trigger. It's supposed to look for all Queen of Suffering units that don't have the Avatar spell yet and give it to them.
 
First of all, please watch the double post; some people will give rep- for that and stuff.


I will admit it... I'm not sure. You could add a short wait based on the distance between caster and target. Just make sure to save (Target unit of ability being cast) in a variable because it will be overwriten by other single target abilities cast during the wait.
This however will make it non-MUI, or 1 per player MUI or however you'd call it if you add an array to it.


A bit of a confusing spell. I wonder if the replacing unit would still count as a (Target Unit of Ability being cast).


Well, you could try again using (Replaced unit) again, maybe it'll work this time. A different methode would be:
Trigger:
  • Actions
    • Set Unit_Group = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to Queen of Suffering) and ((Level of Avatar for (Matching unit)) Equal to 0)))
    • Unit Group - Pick every unit in Unit_Group and do (Actions)
      • Loop - Actions
        • Unit - Add Avatar to (Picked unit)
    • Custom script: call DestroyGroup (udg_Unit_Group)

Place that at the end of the trigger. It's supposed to look for all Queen of Suffering units that don't have the Avatar spell yet and give it to them.

The ability problem is fixed, but I have to do something about the missile art, any suggestion for waiting triggers?

ability stats:
duration hero: 6
duration normal: 6
casting time: 3

Wait 6.00 seconds
trigger?
 
ability stats:
duration hero: 6
duration normal: 6
casting time: 3

Wait 6.00 seconds
trigger?

Well the duration is afther the missile art if I'm correct.
And since it's "A unit Starts the effect of an ability" the trigger activates afther the casting time. The wait should be something like: 0.5 seconds or something.
You could do something like: 0.2 + (0.1x((distance between target and hero)/50) but that would take like an hour of testing and would be completely useless. xD

The easyst thing to do here is to make the animation on target rather than a missile, or make the missile speed 9999 or something. That way you wont need a wait, it will run perfectly and no testing needed. The only difference would be that instead of having an animation flying to your target the animation would play above the target. (Dark Summoning animation would work perfectly for this).
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    We have some elderly guests that regularly come hang out at the bar at the end of the night, and every once in a while we don't see someone for a few weeks and then someone shows up with their obituary.
  • Varine Varine:
    We usually let them do their memorials there in the morning if they want to and I'll make them some snacks and drinks. There was one guy named Tom that came in like every night and would sit by himself and get a bunch of soup and a glass of wine. idk why but he LOVED our fucking soup, like he would order a fucking quart of it at a time and would always get so sad when we stop doing it for the summer.
    +1
  • Varine Varine:
    But he also loved our calamari, which is another thing I hate but it sells super well so I can't change it. There was one day he came in and was asking me how to make it, because he tried to at home once in the off season when we stop running it and he really wanted it lol
  • Varine Varine:
    I think he's one of the only people I've made recipes for for free because he really wanted a broccoli cheddar, and it was like dude I don't have a recipe, it's just whatever I have, but here, this is how you do it
  • Varine Varine:
    I don't think he ever figured out how to do the calamari in a pan though, like idk how to do that either. He was afraid of the at home deep fryers though and it's like yeah, that's fair, I am too
  • Varine Varine:
    He was just such a sweet old man, we had two servers pregnant and they held a baby shower together, he was soooooo fucking excited to get to see a baby. Unfortunately he died a month or so before they were born
  • The Helper The Helper:
    So I decided to Google some people that I had not seen or heard from in a while and sure enough one of my old best friends, we had a falling out years ago but whatever, find out he died of Pancreatic Cancer in January. I have also lost a few of my closer acquaintances from growing up the last year. Getting old - people die - I kinda thought it was going to be this way a few years ago....
    +2
  • The Helper The Helper:
    Forum running super slow again
  • Ghan Ghan:
    Not really clear from the stats as to what is causing the slowness.
  • Ghan Ghan:
    We get a lot of guest traffic so it may just be the load is getting too high and not from any particular source.
  • Ghan Ghan:
    Looks like the server is maxed out on CPU.
  • Ghan Ghan:
    Oh it looks like a lot of the traffic is Silkroad Forums. That domain isn't protected by Cloudflare.
  • Ghan Ghan:
    But the old Silkroad site is still on its own server. I just had a test site set up on this server for it.
  • Ghan Ghan:
    I just disabled that test site. Let's see if that helps the load.
  • Ghan Ghan:
    Looks much better already.
  • The Helper The Helper:
    I had actually forgot about the Silkroad site. I had asked
  • The Helper The Helper:
    SD Ryoko about it and he said the couple of people left on there really like it, that was a few years ago, maybe I should check back
  • jonas jonas:
    I guess when you're getting old, and the last day of soup season draws near, you start wondering
  • jonas jonas:
    will I make it to the start of the next season? or was this the last time I'll ever have my favorite dish?
  • The Helper The Helper:
    I am doing my first Vibe Coding project. In installed the environment and tools according to instructions but it is all chat doing this for me at my direction. It is fun really and holy shit I might finish in 2 hours what it would have taken a day to in my Access and this would be an electron app complete new
  • Ghan Ghan:
    Good stuff.
  • Ghan Ghan:
    Just make sure it is secure. :)
    +1
  • The Helper The Helper:
    It will only be on internal network
  • jonas jonas:
    Man the AI is good about gaslighting about security though. I've had several times where I pointed out security problems and it tried to convince me that with a tiny tweak it suddenly becomes secure
  • jonas jonas:
    Like using a distrobox as a "secure" container, and when I point out that's not secure at all, it claimed that specifying home will make it secure

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top