[Spell] Multiple Impale on the same targets

Level 12
Joined
Sep 11, 2013
Messages
385
Greetings!
It is possible to make Impale spell to hit the same targets multiple times during the stun duration? (MUI and/or with refresher)
It is weird but if i try to impale again a unit that it was previous hited by impale and is still in stun, this message appear "Can't impale this unit" and i can't use impale again on the same unit during stun duration. Also the units must remain vulnerable while they are in the air.

The help will be appreciated!
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,270
Google around for a triggered version, you're bound to find someone that has done it in the past:
This one is a bit "system heavy" but it seems pretty solid.
 
Last edited:
Level 12
Joined
Sep 11, 2013
Messages
385
Google around for a triggered version, you're bound to find someone that has done it in the past:
This one is a bit "system heavy" but it seems pretty solid.
I already searched it on the hive and i found that system, but the problem is that is jass only and i have no idea how to use jass so is a big no no for me..
I was hoping for some easy fix, but this problem seems to be more complicated than i though..
 
Level 9
Joined
Jan 26, 2019
Messages
71
You need a own custom impale, default version is anyway useless because it imposes invulnerability for a minimum of 0.01 sec and rotates units.
This is very easy to do, however you do not understand Jass and since you are 100% not using YDWE PK you do not have enough gui functionality.
All you can is abandon this idea.
If you don’t try to develop your skills and look for ready-made solutions, this will happen all the time.
 
Level 42
Joined
Feb 27, 2007
Messages
5,270
This is very easy to do, however you do not understand Jass and since you are 100% not using YDWE PK you do not have enough gui functionality. All you can is abandon this idea.
I don't normally comment on these sorts of things you say across the site because I know you just like to shill your project but... come on, man. This is blatantly false and can be extremely discouraging to mapmakers by exaggerating the difficulty. Even if it wasn't, how is anything you said constructive or helping the OP with what they want to achieve? You basically showed up, said "yeah give up or use my tool", and left.

If you're going to use a thread like this to advertise for your project instead of contribute to the conversation, at least make an actual example or comparison here that people can look at to see what YDWE PK provides instead of just insulting the OP's aptitude, telling them to give up, and then scolding them for not trying to build something you (incorrectly IMO) said would be quite difficult (??????? that's a massive contradiction of instructions).
 
Level 9
Joined
Jan 26, 2019
Messages
71
I know you just like to shill your project
This is not my project, this is the work of actboy168, sumneko and others, I just improved some things.
And there was a reason for this, some 2-3 years ago I knew no more than the author of this topic, I was able to develop to the current level thanks to YDWE.
And this is not another motivating headline in the spirit of “Just do it”, this is an objective truth, I can attach several old versions of teve res to compare the improvement of my methods from GUI to Jass++. I just wanted to share this with others.
And I’m not trying to promote YDWE PK because I already see that people prefer to do everything using old and familiar methods, I’m just telling the truth - you won’t get far with default gui.
This is blatantly false
This is not a lie even 0.01%
Rather, this is a rough generalization, because if you have to make 2 triggers for the timer to work, this is just complete idiocy, yes, you can use a bunch of ridiculous crutches and even smear yourself with “custom code”, but personally I don’t think this is a solution.
I can do what the author needs, namely “Custom Impale” in one trigger in a couple of minutes.
insulting the OP's aptitude, telling them to give up
I also don’t know why you think that I’m insulting the author’s abilities, I just said that there are no ready-made solutions, so you need to learn to do everything yourself and not hope that somewhere there will be a ready-made system, and even on !GUI (although in YDWE PK this is indeed possible) in any case it's naive.
I know many authors who preferred not to develop their skills and simply did what they could, and simply ignore all other "hard" ideas, and I can say with confidence that they all paid for it. I can even give specific examples.
You basically showed up, said "yeah give up or use my tool", and left.
It seems you don't know what you're talking about.
I just voiced what the author of the topic will do, this is literally a fact, he will do exactly that, namely, abandon this idea, I know about this because I used to be the same.
And I have no illusions that he will switch to YDWE PK, I have long realized that it is useless to offer something innovative in this community.
make an actual example or comparison here that people can look at to see what YDWE PK provides
This doesn’t make sense, I’ve already provided a lot of information in the YDWE PK topic and even created demo maps.
No matter what I do, you will find a thousand reasons to ignore it. "I don’t have wc3 1.26" "my map is already on Reforged" "I’m afraid that the map won’t work on Reforged" and etc.
I repeat, I can make a custom impale in about 10 minutes, but then you say "the map does not open in the reforged editor" and that’s it, this has happened before.

To be honest, I don’t even understand how you dared to send me all this scrap.
All you do is offer people crutches for default gui every day.
That is, literally, I am offering a solution that I have personally tested, which helped me boost my skills about 1000 times, and you are offering to stay at the current level and use poor crutches indefinitely.
And at the same time you dare to speak out like that towards someone who offers something more.
In addition, it’s actually unpleasant for me to read this, considering how much time and effort I invest in the wc3 community without any benefit from it and even minimal donations of support, while you say that I’m “trying to promote my product” and why I’m trying to promote it if it doesn’t bring me anything, it’s all pure altruism.

Personally, it’s obvious to me that my statements simply hurt your pride because I do and offer something more than you, so you came up with convenient for you conclusions about me and decided to compensate for your self-esteem through these statements.

if you really wanted something good, you could do incredible things with me using YDWE PK, you can’t even imagine what opportunities there are for creating various systems, etc., but you don’t do it, like no one else because your goal isn't really to help anyone.
For example, today I helped one person with a problem:As of 1.26, there is no check for a unit's invulnerability, but you can check for level of the 'Avul' ability And since the map is very old and large, it would take too long to replace all the "SetUnitInvulnerable" to issue the 'Avul' ability, so I suggested using a preprocessor. Instant solution to the problem.

#define SetUnitInvulnerable_true(unit) UnitAddAbility(unit, 'Avul')
#define SetUnitInvulnerable_false(unit) UnitRemoveAbility(unit, 'Avul')
#define SetUnitInvulnerable(unit, boolean) SetUnitInvulnerable_ ## boolean(unit)
 
Level 25
Joined
Mar 29, 2020
Messages
1,465
I already searched it on the hive and i found that system, but the problem is that is jass only and i have no idea how to use jass so is a big no no for me..
I was hoping for some easy fix, but this problem seems to be more complicated than i though..
this thread has a triggered GUI version of impale (look for the posts by @Tank-Commander):

start from there and then people here will help you if you get stuck

GL!

I have long realized that it is useless to offer something innovative in this community.

This seems like a bit of a generalization. There are plenty of innovations this community is thrilled to adopt.

It is apparent (from here and the thread from YDWE PK ) you are pretty bitter about the fact that many people continue to use the regular WE GUI and your tool has not become the hive standard. While your tool might have some great functionality, it obviously has things that make it inconvenient for people to transfer to. When something is amazing and the pros clearly outweigh the cons - people go for it. capitalism works.

I doubt you will appreciate my words, but here is my take on your current options -

a. Blame the lack of your project's popularity on others. Continue to be bitter and keep trying to get people to use your system through aggressive comments.
b. enjoy developing your passion project and try to care less about what other people are using and how popular your project is. And maybe if it gets good enough people will eventually see the obvious advantages of using your system.
c. Try to listen to what other people are saying. Do some market research, see what people are saying and why other GUI users are still apprehensive about using your system. try to bridge those gaps. Take the people who show interest in your product and run with them.

By thinking that you did everything possible right and the blame is all on other people, you are also placing your own ability to succeed in their hands.

Good Luck!
 
Last edited:
Level 9
Joined
Jan 26, 2019
Messages
71
This seems like a bit of a generalization. There are plenty of innovations this community is thrilled to adopt.
"Warcraft III: Community Edition" and "better triggers" is no this is not innovations.
innovation is when the Chinese make a platform where player saves are stored in the cloud, which allows you to avoid cheating, while on reforged, in all these years, they haven't even added hotkeys for items.
Innovations is WFE and ujapi, all your "innovations" are crutches to reforged and only to it, while YDWE does not divide players into 1.26 and reforged.
It is apparent (from here and the thread from YDWE PK ) you are pretty bitter about the fact that many people continue to use the regular WE GUI and your tool has not become the hive standard.
My disappointment has nothing to do with my comments, it’s just that you, like the previous person, are looking for a connection where there is none, and this is due to the fact that you are used to being limited within certain limits, while I think completely differently.
I don't really care if you use the YDWE PK or not, if you're giving up huge benefits, that's your problem.
I just said a fact, if you don’t see many useful functions in front of your eyes and you don’t have examples of demo-maps on how to use it, you won’t be able to do most things, and I repeat, I know this from my personal experience.
I have seen many times how people, instead of doing (60 * skill lvl) damage, do 3 different checks for each skill level, because they did not know what could be done differently.
Of course, you can use 2-3 triggers and several global variables for custom impale, but this is only if you understand what and how to do, and even so, it will be inconvenient for you, you are creating problems for yourself in the form of unnecessary rubbish.

Okay, if you still can’t understand that you’re wrong and you don’t like my comments so much for reasons you’ve made up, let’s do the following.
I will not write any more in these threads and will not try to help in any way on hive until you both admit that you were wrong and apologize.
Because I understand perfectly well that
1) you don’t understand that you are wrong.
2) pride will not allow you to do this. Because it was wounded pride that is the reason for the message of the previous comment, he didn’t like the fact that he had been helping people write crutches for years and suddenly a man appeared who offers something that is on a completely different level.
In the end, everyone will live happily, you have defeated the evil "enemy". You can celebrate this with a bottle of beer.

And my comments are not aggressive, I’m just most interested in the technical side and the development of intelligence, things like efficiency, if you need a marketer or a popular boy from romantic anime, this is not for me.
 
Level 12
Joined
Sep 11, 2013
Messages
385
If you don’t try to develop your skills and look for ready-made solutions, this will happen all the time.
I am sorry because I have to make this type of comment, but what you just said is a very wrong assumption and I have to tell you why.
Many people from Hive (including Uncle and Pyrogasm) have very often helped me to solve problems like this and problems much bigger than this spell (They offered me ready-made solutions) because they liked helping other people and/or because they understood that not everyone wants/can learn so much. Also, maybe they helped others because they wanted to develop this community.

"You don't need to learn to build a car in order to drive a car."
"I don't need to learn how to create a spell in order to use the spell in the game."

Btw. I've made an entire map with that kind of help and was great for me.
And there was a reason for this, some 2-3 years ago I knew no more than the author of this topic, I was able to develop to the current level thanks to YDWE.

I don't understand why you think I want to develop my skills like you did... I have many potential reasons not to do this and I think some of those reasons can apply also to other people that need help.

1.Maybe I have a terminal disease and I have no motivation to learn something like that (jass or other complex skills).
2.Maybe I suffer a lot from depression and I have no motivation to learn something like that.
3.Maybe I have a type of autism that will never let me to learn how to solve those complex problems.
4.Maybe I am stupid by design and I am not capable to learn how to solve those complex problems because I forget a lot, I am not capable of focusing and/or I have limited intelligence.
5.Maybe I just want to create another map because I have a good idea, but I don't have enough motivation and is not my hobby to learn how to create every single complex part from this map.
6.Maybe I just want to make a new map for me, my friends and this community and I don't have motivation to do that without the help of the others.
7.Maybe I don't want to learn so much just for a single spell. There is no motivation to do this extreme job for me.

ETC. And no, I don't have a terminal disease or autism...yet.. but this is not the point and I hope you get the point.
No matter what I do, you will find a thousand reasons to ignore it. "I don’t have wc3 1.26" "my map is already on Reforged" "I’m afraid that the map won’t work on Reforged" and etc.

Yes, you're right. Beside that I don't want to learn something new that is so complex because (see the reasons above), I also have OCD and i'am afraid that my map won't work on reforged with futures updates and.. other reasons.
So, honestly, I have many reasons not to want to try that program.
it’s all pure altruism.

Offtopic. From my point of view, philosophically speaking, I don't believe in altruism, but this is just me and I don't want to debate here..

Thank you for your time! I hope you now understand better my position.

start from there and then people here will help you if you get stuck

Maybe I will try in the near future. Thank you!

Offtopic.

God, this thread has become a hell really quick.

:peasant-sad:
 
Level 25
Joined
Mar 29, 2020
Messages
1,465
"Warcraft III: Community Edition" and "better triggers" is no this is not innovations.
innovation is when the Chinese make a platform where player saves are stored in the cloud, which allows you to avoid cheating, while on reforged, in all these years, they haven't even added hotkeys for items.
Innovations is WFE and ujapi, all your "innovations" are crutches to reforged and only to it, while YDWE does not divide players into 1.26 and reforged.
I was talking more about other things on the hive. Many things come to mind, like warsmash, bringing new code languages into warcraft (lua,C#). and pretty much the whole point of the hive is to share innovation and creativity. many useful tools, creative models and amazing art of various kinds. all of these are forms of innovation in my opinion.
you have defeated the evil "enemy"
Nobody said you were evil and nobody is trying to defeat you. I responded to your last post because a. it bothered me that you were belittling many things that other people did. b. It seemed that you were frustrated about something you care about, and I merely shared that I think that your frustration can be alleviated if you slightly alter your approach.

As to what you wrote about using GUI (I hope we can continue this conversation as a contextual discussion, under a mutual understanding that nobody is under attack) -

I think most people that want to advance their skills at mapping eventually move on to some form of free scripting (lua,vjass,C# etc). These offer much more versatility, fluidity, efficiency, speed and convenience than any form of GUI.

what GUI is great for however, is it's ease of access. it comes built into the game and doesn't require any further installation or setup, and it's easy to learn and implement. For these reasons it's where many people start with modding, and more experienced people (who may very well not use GUI for their own stuff) attempt to help them here in the WEHZ forum in the format that the person asking for help is currently working with.

On a personal level, I currently work on my own stuff in C#. I only still use GUI when responding to people who ask questions here. As someone who started their path to programming with GUI, and with the flexible help of this great community I have a lot of gratitude appreciation and will to "give back" to people coding in GUI. Personally, I think that if when I first started asking questions in this forum people told me that in order to make any progress I would have to start installing different third party tools, or learning to code, I would have just stopped then and there.

Would it have been true if they told me that it is much more efficient for me to "lose my crutches" and just learn lua? definitely, but I think it also would have discouraged me from trying. I think the same is true with a lot of people who are new to the scene. That is why I think it is important to help people learn at the level they are currently at, even if it is suboptimal.
 
Last edited:
Level 9
Joined
Jan 26, 2019
Messages
71
Are you guys rehearsing a theater production? What a cringe..

q1 копия.png

q2 копия.png

q3 копия.png

q4 копия.png

There is no need to spam notifications anymore, I have already said that if you think that you know me better than I do myself, and find the audacity to invent facts about me and then speak as if it is true, I will never help on hive again in topics helping newbies.
Btw, if you so boldly claim that custom gui is enough, try doing this on the default gui, you will be very surprised when you find out that nothing works for you.

1234.png
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,270
Here's a triggered version I made, it's a little rough but works as far as I can tell.

Also, it's not completely identical to the original behavior of Impale but it shouldn't be too difficult to modify it to behave how you want.

Requires the latest patch to open the map and relies on Bribe's Unit Indexer (never import more than one of these).

Edit: See my last post for the map.
 
Last edited:
Level 12
Joined
Sep 11, 2013
Messages
385
Here's a triggered version I made, it's a little rough but works as far as I can tell.

Also, it's not completely identical to the original behavior of Impale but it shouldn't be too difficult to modify it to behave how you want.

Requires the latest patch to open the map and relies on Bribe's Unit Indexer (never import more than one of these).
Thank you Uncle!:peasant-smile:
I always use the lastest patch and only one Bribe Unit Indexer as you told me before on other posts.
Sadly I saw few bugs in this impale spell and i don't know how to correct them..
1.Sometimes this spell hit more or less targets even if i use the same spot for casting the spell. (see video 0:08)
2.Sometimes when i hit the same target while the target is in the air, the spell don't cast anymore, but will stole my mana and the hero will start a random channeling. (see video 0:23)

I disable the second special effect and call RemoveLocation( udg_Impale_Point[2] ) because i don't like duplicate impale visual effect.
What you did seems to work almost perfect. :peasant-ok-hand:

 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,270
I ran into issues as well after testing some more, here's a "fixed" version.

The Unit Indexer was out of date and I was using the wrong variables here and there. I restructured the whole thing to make more sense and got rid of the double Impale special effects. I attached the map below.


Note that Impale is meant to be interruptible but if you don't want that functionality then you can delete the Stop Cast trigger and modify the Loop trigger to handle removing the Caster from the Caster Group once the final Wave is released:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Impale_Wave_Count[Impale_CV] Greater than or equal to Impale__Wave_Count[Impale_Level]
    • Then - Actions
      • Unit - Order Impale_Caster to Stop. <---- Get rid of this and replace it with these:
      • Set VariableSet Impale_Is_Active = (Impale_Is_Active - 1) <---- New
      • Unit Group - Remove Impale_Caster from Impale_Caster_Group. <---- New
      • Unit - Remove Impale_Dummy[Impale_CV] from the game <---- New
      • Custom script: call DestroyGroup( udg_Impale_Hit_Group[udg_Impale_CV] ) <---- New
    • Else - Actions
Then change the Follow Through Time of the ability in the Object Editor to 0.00 seconds. This is what makes it act like a pseudo-channeling ability.

However, I don't recommend doing this since these triggers were designed to only allow "one active instance per caster" and things could easily break if you mess with that. To have multiple active instances per caster you would want to use Dynamic Indexing, which I somewhat regret not using.

Edit:
Updated map to have different targeting for Unit/Point.
 

Attachments

  • Triggered Impale 2.w3m
    32.4 KB · Views: 1
Last edited:
Level 12
Joined
Sep 11, 2013
Messages
385
The Unit Indexer was out of date and I was using the wrong variables here and there. I restructured the whole thing to make more sense and got rid of the double Impale special effects. I attached the map below.
I checked, but unit indexer trigger seems the same as previous map.. :peasant-confused:
You seems to fix all the previous problems.:peasant-thumbs-up-cheers:
Note that Impale is meant to be interruptible but if you don't want that functionality then you can delete the Stop Cast trigger and modify the Loop trigger to handle removing the Caster from the Caster Group once the final Wave is released:
It's good, i want that functionality.:peasant-ok-hand:

"One more thing":peasant-sad:

The original impale hit only in the front of the caster, but the triggered impale hit where i click with the mouse on a unit and is weird. Can you please fix that problem to be like the original impale? I put a video below with the problem because my english is bad. I also made lvl 4 impale ( i hope i did all good ).

 

Attachments

  • Triggered Impale 2 problem.w3m
    33.5 KB · Views: 3

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,270
When you cast the ability (Start Cast), use an If Then Else to check if there's a (Target unit of ability being cast).

If there is a unit then Set the Point[1] to it's position, otherwise, set the Point[1] to the (Target point of ability being cast) like it's doing now.
 
Level 12
Joined
Sep 11, 2013
Messages
385
When you cast the ability (Start Cast), use an If Then Else to check if there's a (Target unit of ability being cast).

If there is a unit then Set the Point[1] to it's position, otherwise, set the Point[1] to the (Target point of ability being cast) like it's doing now.
I have no idea of what i am doing. :peasant-sad: I think is not like this, but i don't know what to do from here..
  • Impale Start Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Impale (Hero)
    • Actions
  • ----------------------------------------------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Target unit of issued order) Equal to (Target unit of ability being cast)
      • Then - Actions
        • Set VariableSet Impale_Point[1] = (Position of (Target unit of issued order))
      • Else - Actions
        • Set VariableSet Impale_Point[1] = (Position of (Target unit of ability being cast))
  • ----------------------------------------------
    • Set VariableSet Impale_Caster = (Triggering unit)
    • Set VariableSet Impale_CV = (Custom value of Impale_Caster)
    • -------- --------
    • Set VariableSet Impale_Is_Active = (Impale_Is_Active + 1)
    • Unit Group - Add Impale_Caster to Impale_Caster_Group
    • Trigger - Turn on Impale Loop <gen>
    • -------- --------
    • Set VariableSet Impale_Point[0] = (Position of Impale_Caster)
    • Set VariableSet Impale_Point[1] = (Target point of ability being cast)
    • Set VariableSet Impale_Angle[Impale_CV] = (Angle from Impale_Point[0] to Impale_Point[1])
    • -------- --------
    • Set VariableSet Impale_Wave_Count[Impale_CV] = 0
    • Set VariableSet Impale_Wave_Time[Impale_CV] = 0.01
    • Custom script: set udg_Impale_Hit_Group[udg_Impale_CV] = CreateGroup()
    • -------- --------
    • Unit - Create 1 Impale Dummy for (Owner of Impale_Caster) at Impale_Point[0] facing Default building facing degrees
    • Set VariableSet Impale_Dummy[Impale_CV] = (Last created unit)
    • Unit - Set level of Impale (Dummy - Stun) for Impale_Dummy[Impale_CV] to (Level of (Ability being cast) for Impale_Caster)
    • Unit - Add a 5.00 second Generic expiration timer to Impale_Dummy[Impale_CV]
    • -------- --------
    • Custom script: call RemoveLocation( udg_Impale_Point[0] )
    • Custom script: call RemoveLocation( udg_Impale_Point[1] )
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,270
See these Actions:
  • Set VariableSet Impale_Point[0] = (Position of Impale_Caster)
  • Set VariableSet Impale_Point[1] = (Target point of ability being cast)
  • Set VariableSet Impale_Angle[Impale_CV] = (Angle from Impale_Point[0] to Impale_Point[1])
This is how you calculate the direction that the Impale travels towards. Point[0] = Where the caster is. Point[1] = Where you cast the ability.

The problem is that the (Target point of ability being cast) represents the exact point that you clicked when casting the ability. But you want to be able to target a unit directly, disregarding the coordinates of your mouse and instead using the unit's origin. To achieve this you need to make a distinction between these two scenarios.

This is what the trigger should look like:
  • Impale Start Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Impale (Hero)
    • Actions
      • Set VariableSet Impale_Caster = (Triggering unit)
      • Set VariableSet Impale_CV = (Custom value of Impale_Caster)
      • -------- --------
      • Set VariableSet Impale_Is_Active = (Impale_Is_Active + 1)
      • Unit Group - Add Impale_Caster to Impale_Caster_Group
      • Trigger - Turn on Impale Loop <gen>
      • -------- --------
      • Set VariableSet Impale_Point[0] = (Position of Impale_Caster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Equal to No unit
        • Then - Actions
          • Set VariableSet Impale_Point[1] = (Target point of ability being cast)
        • Else - Actions
          • Set VariableSet Impale_Point[1] = (Position of (Target unit of ability being cast))
      • Set VariableSet Impale_Angle[Impale_CV] = (Angle from Impale_Point[0] to Impale_Point[1])
      • -------- --------
      • Set VariableSet Impale_Wave_Count[Impale_CV] = 0
      • Set VariableSet Impale_Wave_Time[Impale_CV] = 0.01
      • Custom script: set udg_Impale_Hit_Group[udg_Impale_CV] = CreateGroup()
      • -------- --------
      • Unit - Create 1 Impale Dummy for (Owner of Impale_Caster) at Impale_Point[0] facing Default building facing degrees
      • Set VariableSet Impale_Dummy[Impale_CV] = (Last created unit)
      • Unit - Set level of Impale (Dummy - Stun) for Impale_Dummy[Impale_CV] to (Level of (Ability being cast) for Impale_Caster)
      • Unit - Add a 5.00 second Generic expiration timer to Impale_Dummy[Impale_CV]
      • -------- --------
      • Custom script: call RemoveLocation( udg_Impale_Point[0] )
      • Custom script: call RemoveLocation( udg_Impale_Point[1] )
Simple: If there's no target unit then we know that we clicked a point. If there's a target unit then we know that we clicked a unit.

Also, remember to use Event Responses that are related to the Event. If the Event doesn't mention the word "Order" then the Event Responses won't have anything to do with "Orders". In this case an Ability was cast, therefore the word "Ability" is what we should look for in our Event Responses and other functions.
 
Last edited:
Level 12
Joined
Sep 11, 2013
Messages
385
See these Actions:
  • Set VariableSet Impale_Point[0] = (Position of Impale_Caster)
  • Set VariableSet Impale_Point[1] = (Target point of ability being cast)
  • Set VariableSet Impale_Angle[Impale_CV] = (Angle from Impale_Point[0] to Impale_Point[1])
This is how you calculate the Angle that the Impale travels towards. Point[0] = Where the caster is. Point[1] = Where you cast the ability.

The problem is that the (Target point of ability being cast) takes the exact POINT that you clicked when casting the ability. But you want the ability to also target the UNIT if you happen to click on one directly.

So this is what the trigger should look like:
  • Impale Start Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Impale (Hero)
    • Actions
      • Set VariableSet Impale_Caster = (Triggering unit)
      • Set VariableSet Impale_CV = (Custom value of Impale_Caster)
      • -------- --------
      • Set VariableSet Impale_Is_Active = (Impale_Is_Active + 1)
      • Unit Group - Add Impale_Caster to Impale_Caster_Group
      • Trigger - Turn on Impale Loop <gen>
      • -------- --------
      • Set VariableSet Impale_Point[0] = (Position of Impale_Caster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Equal to No unit
        • Then - Actions
          • Set VariableSet Impale_Point[1] = (Target point of ability being cast)
        • Else - Actions
          • Set VariableSet Impale_Point[1] = (Position of (Target unit of ability being cast))
      • Set VariableSet Impale_Angle[Impale_CV] = (Angle from Impale_Point[0] to Impale_Point[1])
      • -------- --------
      • Set VariableSet Impale_Wave_Count[Impale_CV] = 0
      • Set VariableSet Impale_Wave_Time[Impale_CV] = 0.01
      • Custom script: set udg_Impale_Hit_Group[udg_Impale_CV] = CreateGroup()
      • -------- --------
      • Unit - Create 1 Impale Dummy for (Owner of Impale_Caster) at Impale_Point[0] facing Default building facing degrees
      • Set VariableSet Impale_Dummy[Impale_CV] = (Last created unit)
      • Unit - Set level of Impale (Dummy - Stun) for Impale_Dummy[Impale_CV] to (Level of (Ability being cast) for Impale_Caster)
      • Unit - Add a 5.00 second Generic expiration timer to Impale_Dummy[Impale_CV]
      • -------- --------
      • Custom script: call RemoveLocation( udg_Impale_Point[0] )
      • Custom script: call RemoveLocation( udg_Impale_Point[1] )
Remember to use Event Responses that are related to the Event. If the Event doesn't mention the word "Order" then the Event Responses won't have anything to do with "Orders". In this case an Ability was cast, therefore the word "Ability" is what we should look for in our Event Responses.
Works like a charm! And makes sense now! Thank you so much!

Remember to use Event Responses that are related to the Event. If the Event doesn't mention the word "Order" then the Event Responses won't have anything to do with "Orders". In this case an Ability was cast, therefore the word "Ability" is what we should look for in our Event Responses.
I know that, yes. like "a unit takes damage and damage source"
:peasant-thumbs-up-cheers:
 
Top