hopy
Active Member
- Reaction score
- 64
Well as always I've saved all my questions for one threat to save some spam on the forums. (Not that you will realy notice it).
I'll edit this post every time a question is awnsered to show that I've got my awnser and add the solutions to the question in case someone else has the same problem later.
I apologize for the many grammer and spelling errors in this post, english is not my main language and although I tried my best to make as few mestakes as posible but it's far from perfect, so if you're bored and good at english please let me know if I made a mestake and I'll try to learn from it and remember it.
Question one: Anger ability - Fixed, thank you. .
Well then, the first problem is about an ability called Anger:
Angers a unit causing it to go into rage giving it more attack power. This unit will attack both friendly and enemy players.
Anger [Mediator] is a Custom ability based on Frost Nova, it adds a buff to the unit, deals no damage and has no AoE (0) and the targets allowed are: air,enemies,friend,ground,neutral,non-hero,organic.
Anger [Dummy] is a Custom dummy ability based on Bloodlust and just increases attack and movement speed.
- Angry_Unit is a Unit Variable
- Point is a point variable (O'rly?)
- Unit_Group is a unit group variable (I'm so original with names).
- Random_Unit is also a unit variable I believe
The effect: Everyone gets the Anger buff, even though the AoE is 0, I should base it on a different ability but I think there was a reason I based it on Frost Nova.
After everyone suddenly is pissed off because of an Anger debuff they don't do what they're told and just attack their enemies.
I've only tested it on Computer players and Neutral Hostile so far, but it's supposed to work against those as well.
The awnser:
Question 2: Rapid Killing - Fixed, Thank you.
This ability does something like:
Allows the Archer to hit up to 3 targets at once on attack as well as get bonuses from elemental attacks for a short duration. - Fire deals 10% more damage. - Ice has 20% more ranged and a 0.5 second shorter Cool Down. - Nature can hit an aditional target.
In short: Switches between a different type of a custom Barrage afther every shot.
Rapid Killing [Archer] is a custom ability based on Berserk because: It's a self cast instant ability that adds a buff and in Rapid Killing's it's first design it also increased attack speed by 50%, even though I doubt that'll work with Barrage for it has a cooldown.
Rapid Killing [Nature]/[Fire]/[Ice] are all based on Barrage only with a different missile animation and some different stats.
Rapid_Killing[] is an ability array variable thingy.
Interger is an ... you get 3 guesses.
(Now that I read the trigger again after some time, does the (Triggering Unit) still work after the wait?).
Anyways, I see multiple and sometimes all three of the missile animations at once, so I thought she had all the abilities at once. I tested it and turns out the barrage abilities don't get removed until the duration is over. Can anyone see what's causing that?
(And yea the Ability variables are normally set at Map Initialization or however you'd spell that but I added them to this trigger for now to make it easier to post).
Question 3: Multi Shot - Still need some help please.
Well not hard to guess but it's basically: Fire a custom dummy ability at 3 targets at once for one shot.
Now what I wanted to ask was: Is it possible to make sure that the dummy abilities are only fired at targets in front of the Archer? I know I've seen a backstab ability a long time ago and I think this would the same way but I'm not sure how this can be triggered, so I would appreciate it if someone could give me a hint or two.
The Question: How do I make sure only units in front of the casting units are selected (in a Unit Group).
Question 4: A unit is attacked events - Fixed, Thank you.
Today I read somewhere that the 'A unit is attacked' event is bugged and can somehow be triggered multiple times by holding the Stop button or something like that... I don't know if that's true so I wanted to ask:
- Is this true?
- How do I prevent people from using it?
- Is it important that I prevent this?
The awnser:
Question 5: Waits in Loops - Fixed, Thank you.
Well, someone told me once that Waits in loops don't matter, but that stuff like (Target unit of ability being cast) can get overwriten. Well afther not using my editor for a while and afther an update suddenly alot of abilities started to bug that worked perfectly befor, afther some inspecting I found out that all of these triggers used a loop with a wait in it.
(This could also be the reason Question 1 doesn't work?).
An example of such a trigger is:
This one used to work perfectly but since last time it only plays his slam animation once...
So I would like to get an clear awnser to this question now: Do waits in loops cause it to bug or not? I've asked this before, multiple times in fact, and everytime people told me something different. xD
The awnser:
Question 6: The Most Important One: Random Command - Still need some help please.
Well since some of my abilities ain't MUI and I personally prefer everyone to have a different hero I tried to make every hero only be selectable once. This all worked fine until I tried to make a random trigger. The random trigger works fine but the heroes are still pickable after that.
The Normal Hero pick Trigger:
Hero[] is an Intreger array variable, this one is used to check if the hero is still avalible.
Player[] is a player array variable, this is used in a different trigger so it's not realy important here.
Point is a ... point!
Sound[] is an sound array variable set in the next trigger:
The Variable set trigger... ?
(Repeat the Sound[] x25 with different sounds and numbers as well as the Random_Array[] x25 for all the heroes).
The Random Trigger:
(Does that condition leak?)
Anyways, my plan for this Random Trigger is check if Hero[Random Number set in Random_Hero] is still available, if not it will run the trigger again and roll a different number until an available number is rolled.
After that it does what the normal trigger also does and sets Hero[_Random_Data[_Random_Hero]] = 1 so that should make that number unavailable in the normal trigger (Condition: Hero[1] Equal to 0)
At first I thought that I used the wrong number variables and that I made a wrong hero unavailable but I could still pick every other hero...
So basically everything seems to work (although I'm not sure if the sound works) exept for the Set Hero[blahblah] = 1...
Can someone see what's wrong here?
(I used http://world-editor-tutorials.thehel...n.php#triggers for my random trigger and edited it a bit).
Anyways, +rep for any solved question and thanks in advance.
I will reply as soon as possible with the results of tests and such, but it takes some time to load everything on my map.
And even though I did my best to make everything as detailed as posible let me know if you need any more information or if I forgot to mention anything.
~Antisora
I'll edit this post every time a question is awnsered to show that I've got my awnser and add the solutions to the question in case someone else has the same problem later.
I apologize for the many grammer and spelling errors in this post, english is not my main language and although I tried my best to make as few mestakes as posible but it's far from perfect, so if you're bored and good at english please let me know if I made a mestake and I'll try to learn from it and remember it.
Question one: Anger ability - Fixed, thank you. .
Well then, the first problem is about an ability called Anger:
Angers a unit causing it to go into rage giving it more attack power. This unit will attack both friendly and enemy players.
Trigger:
- Anger
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Anger [Mediator]
- Actions
- Set Angry_Unit = (Target unit of ability being cast)
- Set Point = (Position of Angry_Unit)
- Unit - Create 1 Dummy Unit for (Owner of Angry_Unit) at Point facing Default building facing degrees
- Unit - Add Anger [Dummy] to (Last created unit)
- Unit - Set level of Anger [Dummy] for (Last created unit) to (Level of Anger [Mediator] for (Triggering unit))
- Unit - Order (Last created unit) to Orc Shaman - Bloodlust Angry_Unit
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- For each (Integer A) from 1 to (6 + ((Level of Anger [Mediator] for (Triggering unit)) x 3)), do (Actions)
- Loop - Actions
- Set Unit_Group = (Units within 700.00 of Angry_Loc matching ((((Matching unit) is A structure) Not equal to True) and ((((Unit-type of (Matching unit)) Not equal to Gold Mine) or ((Unit-type of (Matching unit)) Not equal to Dummy Unit [Anti Magic Field])) and ((Unit-type of (
- Unit Group - Pick every unit in Unit_Group and do (Actions)
- Loop - Actions
- Set Random_Unit = (Random 1 units from Angry_Group)
- Unit Group - Pick every unit in Random_Unit and do (Unit - Order Angry_Unit to Attack (Picked unit))
- Custom script: call DestroyGroup( udg_Random_Unit )
- Loop - Actions
- Custom script: call DestroyGroup (udg_Unit_Group)
- Wait 1.50 seconds
- Loop - Actions
- Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Point facing Default building facing degrees
- Unit - Order Angry_Unit to Stop
- Events
Anger [Mediator] is a Custom ability based on Frost Nova, it adds a buff to the unit, deals no damage and has no AoE (0) and the targets allowed are: air,enemies,friend,ground,neutral,non-hero,organic.
Anger [Dummy] is a Custom dummy ability based on Bloodlust and just increases attack and movement speed.
- Angry_Unit is a Unit Variable
- Point is a point variable (O'rly?)
- Unit_Group is a unit group variable (I'm so original with names).
- Random_Unit is also a unit variable I believe
The effect: Everyone gets the Anger buff, even though the AoE is 0, I should base it on a different ability but I think there was a reason I based it on Frost Nova.
After everyone suddenly is pissed off because of an Anger debuff they don't do what they're told and just attack their enemies.
I've only tested it on Computer players and Neutral Hostile so far, but it's supposed to work against those as well.
The awnser:
Question 2: Rapid Killing - Fixed, Thank you.
This ability does something like:
Allows the Archer to hit up to 3 targets at once on attack as well as get bonuses from elemental attacks for a short duration. - Fire deals 10% more damage. - Ice has 20% more ranged and a 0.5 second shorter Cool Down. - Nature can hit an aditional target.
In short: Switches between a different type of a custom Barrage afther every shot.
Trigger:
- Rapid Killing
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Rapid Killing [Archer]
- Actions
- Set Rapid_Killing[1] = Rapid Killing [Nature]
- Set Rapid_Killing[2] = Rapid Killing [Ice]
- Set Rapid_Killing[3] = Rapid Killing [Fire]
- Wait (10.50 + (3.00 x (Real((Level of Rapid Killing [Archer] for (Triggering unit)))))) game-time seconds
- Unit - Remove Rapid Killing [Nature] from (Triggering unit)
- Unit - Remove Rapid Killing [Ice] from (Triggering unit)
- Unit - Remove Rapid Killing [Fire] from (Triggering unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Events
Trigger:
- Rapid Killing Attack
- Events
- Unit - A unit Is attacked
- Conditions
- ((Attacking unit) has buff Rapid Killing ) Equal to True
- Actions
- Wait 1.90 game-time seconds
- Unit - Remove Rapid Killing [Nature] from (Triggering unit)
- Unit - Remove Rapid Killing [Ice] from (Triggering unit)
- Unit - Remove Rapid Killing [Fire] from (Triggering unit)
- Set Interger = (Random integer number between 1 and 3)
- Unit - Add Rapid_Killing[Interger] to (Attacking unit)
- Unit - Set level of Rapid_Killing[Interger] for (Attacking unit) to (Level of Rapid Killing [Archer] for (Attacking unit))
- Events
Rapid Killing [Archer] is a custom ability based on Berserk because: It's a self cast instant ability that adds a buff and in Rapid Killing's it's first design it also increased attack speed by 50%, even though I doubt that'll work with Barrage for it has a cooldown.
Rapid Killing [Nature]/[Fire]/[Ice] are all based on Barrage only with a different missile animation and some different stats.
Rapid_Killing[] is an ability array variable thingy.
Interger is an ... you get 3 guesses.
(Now that I read the trigger again after some time, does the (Triggering Unit) still work after the wait?).
Anyways, I see multiple and sometimes all three of the missile animations at once, so I thought she had all the abilities at once. I tested it and turns out the barrage abilities don't get removed until the duration is over. Can anyone see what's causing that?
(And yea the Ability variables are normally set at Map Initialization or however you'd spell that but I added them to this trigger for now to make it easier to post).
Question 3: Multi Shot - Still need some help please.
Well not hard to guess but it's basically: Fire a custom dummy ability at 3 targets at once for one shot.
Now what I wanted to ask was: Is it possible to make sure that the dummy abilities are only fired at targets in front of the Archer? I know I've seen a backstab ability a long time ago and I think this would the same way but I'm not sure how this can be triggered, so I would appreciate it if someone could give me a hint or two.
The Question: How do I make sure only units in front of the casting units are selected (in a Unit Group).
Question 4: A unit is attacked events - Fixed, Thank you.
Today I read somewhere that the 'A unit is attacked' event is bugged and can somehow be triggered multiple times by holding the Stop button or something like that... I don't know if that's true so I wanted to ask:
- Is this true?
- How do I prevent people from using it?
- Is it important that I prevent this?
The awnser:
"A unit is attacked" event triggers when something starts its attack on a unit. Let me elaborate the stages of attacking:
Order -> Get in Range -> Start attack with animation -> Projectile Trajectory (if any) -> Damage
So essentially the event fires off at the "Start attack with animation" stage, rather than the damage stage. So lets say someone does this:
Start attack with animation -> Someone taps "S", ordering the unit to stop its attack and canceling the attack -> No attack + No damage dealt.
So here, the attack didn't really happen fully, but whatever triggers you make with that event will still run....so it can be abused.
So the solution is a Damage Detection System. A system that tracks damage dealt instead of the attack orders. Here's Weep's GUI Friendly Damage Detection System.
Question 5: Waits in Loops - Fixed, Thank you.
Well, someone told me once that Waits in loops don't matter, but that stuff like (Target unit of ability being cast) can get overwriten. Well afther not using my editor for a while and afther an update suddenly alot of abilities started to bug that worked perfectly befor, afther some inspecting I found out that all of these triggers used a loop with a wait in it.
(This could also be the reason Question 1 doesn't work?).
An example of such a trigger is:
Trigger:
- Triple Slash
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Triple Slash [Blade Master]
- Actions
- Set TS_Hero = (Triggering unit)
- Set TS_Target = (Target unit of ability being cast)
- Set TS_Damage2 = (24.00 + ((Real((Hero level of TS_Hero))) + (((Real((Level of Command Aura [Blade Master] for (Triggering unit)))) x 10.00) + ((Real((Level of Triple Slash [Blade Master] for TS_Hero))) x 5.00))))
- Unit - Pause (Triggering unit)
- For each (Integer A) from 1 to 3, do (Actions)
- Loop - Actions
- Animation - Change FlS_Caster's animation speed to (110.00 + ((Real((Level of Triple Slash [Blade Master] for TS_Hero))) x 20.00))% of its original speed
- Special Effect - Create a special effect attached to the origin of Omni_Caster using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
- Animation - Play TS_Hero's attack slam animation
- Special Effect - Destroy (Last created special effect)
- Unit - Cause TS_Hero to damage TS_Target, dealing TS_Damage2 damage of attack type Hero and damage type Normal
- Wait (0.90 - ((Real((Level of Triple Slash [Blade Master] for (Triggering unit)))) x 0.10)) seconds
- Loop - Actions
- Animation - Change FlS_Caster's animation speed to 100.00% of its original speed
- Unit - Unpause (Triggering unit)
- Events
This one used to work perfectly but since last time it only plays his slam animation once...
So I would like to get an clear awnser to this question now: Do waits in loops cause it to bug or not? I've asked this before, multiple times in fact, and everytime people told me something different. xD
The awnser:
At first, I need to tell something.It seems you are using integer A with all your triggers, but while using an integer A loop with wait, if another trigger use it too, bad things can happen Because there is no difference between integer A and an integer variable.
Some retards say "waits doesn't work inside loops, don't use them".No they are working fine with integer loops.But the only problem is, you can't use (target unit of ability being cast) after a wait.But it doesn't matter since you put him inside a variable.
Question 6: The Most Important One: Random Command - Still need some help please.
Well since some of my abilities ain't MUI and I personally prefer everyone to have a different hero I tried to make every hero only be selectable once. This all worked fine until I tried to make a random trigger. The random trigger works fine but the heroes are still pickable after that.
The Normal Hero pick Trigger:
Trigger:
- Blade Master
- Events
- Unit - A unit enters Hero Blade Master <gen>
- Conditions
- Hero[1] Equal to 0
- (Unit-type of (Triggering unit)) Equal to Wisp [Hero pick]
- Actions
- Set Hero[1] = 1
- Set Player[1] = (Owner of (Triggering unit))
- Animation - Change Blademaster 0185 <gen>'s vertex coloring to (15.00%, 15.00%, 15.00%) with 50.00% transparency
- Set Point = (Center of Start Lokation <gen>)
- Unit - Create 1 Blademaster for (Owner of (Triggering unit)) at Point facing Default building facing degrees
- Game - Display to (All players matching (((Matching player) is an ally of (Owner of (Triggering unit))) Equal to True)) the text: (|cffff0000A player has chosen: |r + ((Name of (Last created unit)) + .))
- Selection - Select (Last created unit) for (Owner of (Last created unit))
- Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Lokation <gen>) over 0.00 seconds
- Unit - Remove (Triggering unit) from the game
- Sound - Play Sound[1] at 100.00% volume, attached to (Last created unit)
- Hero - Create Potion of Healing start and give it to (Last created unit)
- Hero - Create Potion of Healing start and give it to (Last created unit)
- Hero - Create Potion of Healing start and give it to (Last created unit)
- Game - Display to (All players matching (((Matching player) is an ally of (Owner of (Triggering unit))) Equal to True)) the text: Blademaster. Thoug...
- Custom script: call RemoveLocation (udg_Point)
- Events
Hero[] is an Intreger array variable, this one is used to check if the hero is still avalible.
Player[] is a player array variable, this is used in a different trigger so it's not realy important here.
Point is a ... point!
Sound[] is an sound array variable set in the next trigger:
The Variable set trigger... ?
Trigger:
- Intialization
- Events
- Map initialization
- Conditions
- Actions
- Set Sound[1] = HeroBladeMasterReady1 <gen>
- Set _Total_hero = 25
- Set _Random_Count = 25
- Set _Random_Array[1] = Blademaster
- For each (Integer A) from 1 to 25, do (Actions)
- Loop - Actions
- Set _Random_Data[(Integer A)] = (Integer A)
- Loop - Actions
- Events
(Repeat the Sound[] x25 with different sounds and numbers as well as the Random_Array[] x25 for all the heroes).
The Random Trigger:
Trigger:
- Random Command
- Events
- Player - Player 1 (Red) types a chat message containing -random as An exact match
- Conditions
- (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 0
- Actions
- Set _Random_Hero = (Random integer number between 1 and _Random_Count)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Hero[_Random_Data[_Random_Hero]] Equal to 0
- Then - Actions
- Set Point = (Center of Start Lokation <gen>)
- Unit - Create 1 _Random_Array[_Random_Data[_Random_Hero]] for Player 1 (Red) at Point facing Default building facing degrees
- Game - Display to (All players matching (((Matching player) is an ally of (Owner of (Triggering unit))) Equal to True)) the text: (A player has chosen: + ((Name of (Last created unit)) + .))
- Selection - Select (Last created unit) for (Owner of (Last created unit))
- Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Lokation <gen>) over 0.00 seconds
- Set _Random_Data[_Random_Hero] = _Random_Count
- Set _Random_Count = (_Random_Count - 1)
- Custom script: call RemoveLocation (udg_Point)
- Set Hero[_Random_Data[_Random_Hero]] = 1
- Set Player[_Random_Data[_Random_Hero]] = (Owner of (Triggering unit))
- Hero - Create Potion of Healing start and give it to (Last created unit)
- Hero - Create Potion of Healing start and give it to (Last created unit)
- Hero - Create Potion of Healing start and give it to (Last created unit)
- Sound - Play Sound[_Random_Data[_Random_Hero]] at 100.00% volume, attached to (Last created unit)
- Else - Actions
- Set _Random_Hero = (Random integer number between 1 and _Random_Count)
- Trigger - Run (This trigger) (checking conditions)
- If - Conditions
- Events
(Does that condition leak?)
Anyways, my plan for this Random Trigger is check if Hero[Random Number set in Random_Hero] is still available, if not it will run the trigger again and roll a different number until an available number is rolled.
After that it does what the normal trigger also does and sets Hero[_Random_Data[_Random_Hero]] = 1 so that should make that number unavailable in the normal trigger (Condition: Hero[1] Equal to 0)
At first I thought that I used the wrong number variables and that I made a wrong hero unavailable but I could still pick every other hero...
So basically everything seems to work (although I'm not sure if the sound works) exept for the Set Hero[blahblah] = 1...
Can someone see what's wrong here?
(I used http://world-editor-tutorials.thehel...n.php#triggers for my random trigger and edited it a bit).
Anyways, +rep for any solved question and thanks in advance.
I will reply as soon as possible with the results of tests and such, but it takes some time to load everything on my map.
And even though I did my best to make everything as detailed as posible let me know if you need any more information or if I forgot to mention anything.
~Antisora