• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Negative effect Aura

Status
Not open for further replies.
Level 3
Joined
Jun 6, 2007
Messages
48
Negative effect Aura and Triggers

I have a hero who's Aura i would like to decrease nearby units attack speed by a % when they're within the Aura's AoE but i have no idea how o set up a Negative aura although i have seen it done in other games which gives me hope.

If anyone can suggest or help out, that would be very helpful thanks. :)
 
Last edited:
Level 13
Joined
Nov 22, 2006
Messages
1,260
You mean that the aura has a negative effect? That's easy, go to preferences, put a tick in the "allow negative values in the object editor" box and just put negative values in the data fields in object editor.

If you would want to change targets allowed too, changing an existing spell wouldn't work, you would have to create a new custom ability.

Hope I got your question right :)
 
Level 3
Joined
Jun 6, 2007
Messages
48
Wow thanks Silvenon and Donut. :D

I have hit another brickwall. :(, when the hero learns a certain custom skill i want a variable that controls it's damage to be increased but whenever i go along the "A player owned by Player (2) blue learns a skill" i can't find a condition to determine it's my custom skill, theres no "Ability being learnt equal to Ice Shard".

Also, when i cast Ice Shard it runs a trigger that spawn a really really tiny black mortar team that shoots frost wyrm ice to make it look like a ball but the problem is that when it spawns the mortar team it doesn't spawn right in the middle of my hero it spawns next to it or near it so that when it fire my hero does the attack animation but the ice comes from just next to him and looks obscure. Is there any way to guarantee that the unit spawns right on top of my unit? Thanks.
 
Last edited:
Level 3
Joined
Jun 6, 2007
Messages
48
The last thing i need help with would be the damage for the Ice shard spell, since now i got the positioning and the firing perfect. (Thanks heaps guys)

This is my current trigger but it only does the 1-2 damage from the mortar team and i'm puzzled.

  • Events
    • Unit - A unit owned by player 1 red learns a skill
  • Conditions
    • (Triggering unit) Equal to WaterHero
    • (Ability being cast) Equal to Ice Shard
  • Actions
    • Unit - Create 1 IceshardDummy for Player 1 (Red) at (Center of AloreRgn <gen>) facing Default building facing degrees
    • Unit - Turn collision for (Last created unit) Off
    • Unit - Order (Last created unit) to Attack Ground (Target point of ability being cast)
    • Wait 1.00 seconds
    • Unit - Remove (Last created unit) from the game
    • Region - Center IceShardDamage <gen> on (Target point of ability being cast)
    • Unit Group - Pick every unit in (Units in IceShardDamage <gen>) and do (Unit - Cause WaterHero to damage circular area after 0.05 seconds of radius (Max X of IceShardDamage <gen>) at (Center of IceShardDamage <gen>), dealing IceShardDamage damage of attack type Spells and damage type Normal)
Oh and also is there any way i could determine the level of a spell through a trigger, my Enchanted arrows spell gives a frost bonus to damage but since i can't figure out how to get the level it just gives the level one dummy spell for each level.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
There are some variables missing......WaterHero, IceShardDamage....

Shouldn't it be "starts the effect of an ability" instead of "learns a skill"?This trigger never fires because the condition will never be true, "Ability being cast" works only for "starts the effect"/"begins casting"/"finishes casting an ability".

So I suggest changing the event to "starts the effect of an ability", because that is probably what you want.

Oh and also is there any way i could determine the level of a spell through a trigger, my Enchanted arrows spell gives a frost bonus to damage but since i can't figure out how to get the level it just gives the level one dummy spell for each level.

Conditions -> Integer comparison -> Level of ability for unit.
 
Level 3
Joined
Jun 6, 2007
Messages
48
I set the Event to "begins casting an ability" but it still doesn't work.

My variables are simple:

IceShardDamage(Region) = Region 001
IceShardDamage(Real) = 100
AloreRgn = Region 002
WaterHero = Nymph Hero 0001

Maybe i should change variable names. :s

Pretty much what i want to happen is just for 300 AoE around wherever the player targets, all units inside that AoE get hit for 100, 165 or 230 depending on level.
 
Level 3
Joined
Jun 6, 2007
Messages
48
This is my base ability now.

IceShard Trigger
  • Events
    • Unit - A unit owned by player 1 red learns a skill
  • Conditions
    • (Triggering unit) Equal to WaterHero
    • (Ability being cast) Equal to Ice Shard
  • Actions
    • Region - Center IceShardDamage <gen> on (Target point of ability being cast)
    • Unit - Create 1 IceshardDummy for Player 1 (Red) at (Center of AloreRgn <gen>) facing Default building facing degrees
    • Unit - Turn collision for (Last created unit) Off
    • Unit - Order (Last created unit) to Attack Ground (Target point of ability being cast)
    • Wait 0.30 seconds
    • Trigger - Run (ignoring conditions) IceShardDamage
    • Wait 0.70 seconds
    • Unit - Remove (Last created unit) from the game
And i made a seperate trigger so i could get the timing right so the damage applies just as the effects hit.

IceShardDamage Trigger
  • Events
    • A unit owned by Player 1 (Red) Begins casting an ability
  • Conditions
    • (Number of units in (Units in (Playable map area)) Equal to 999
  • Actions
    • Unit Group - Pick every unit in (Units in IceShardDamage <gen>) and do (Unit - Cause WaterHero to damage circular area after 0.00 seconds of radius (Max X of IceShardDamage <gen>) at (Center of IceShardDamage <gen>), dealing IceShardDamage damage of attack type Spells and damage type Normal)
    • Floating Text - Create floating text that reads (String(ISDamage, 1, 0)) above (Picked unit) with Z offest 0.00, using font size 10.00 (100%, 10%, 10%), and 0% transparency
The Variable ISDamage is determines by the level of Ice Shard.

IceShardLv Trigger
  • Events
    • Unit - A unit owned by player 1 (Red) Learns a skill
  • Conditions
    • (Learning Hero) Equal to WaterHero
    • (Learned Hero skill) Equal to Ice Shard
  • Actions
    • If ((Level of Ice Shard for (Triggering unit)) Equal to 1) then do (Set ISDamage = 100.00) else do (Do nothing)
    • If ((Level of Ice Shard for (Triggering unit)) Equal to 2) then do (Set ISDamage = 165.00) else do (Do nothing)
    • If ((Level of Ice Shard for (Triggering unit)) Equal to 3) then do (Set ISDamage = 230.00) else do (Do nothing)

I have two questions:

A) My skill hits and show floating text equal to 230 damage so why does it kill Grunts with 700hp in one hit?

B) Is it possible to have the floating text say "230" instead of "230.00"?
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
A) My skill hits and show floating text equal to 230 damage so why does it kill Grunts with 700hp in one hit?

That's impossible because IceShard trigger doesn't fire at all, because you put "learns a skill" instead of "starts the effect of an ability" again ("target point of ability being cast" is "none", "ability being cast" condition is false all the time....).

B) Is it possible to have the floating text say "230" instead of "230.00"?

Yes, I think only stuff like Game - Display text show decimals.

My question is (again): why do you use "begins casting an ability"? The spell fires to early then, it should be like all the other spells.
 
Level 3
Joined
Jun 6, 2007
Messages
48
Ok i redid my IceShard trigger:

IceShard Trigger
  • Events
    • Unit - A unit owned by player 1 red starts the effects of an ability
  • Conditions
    • (Triggering unit) Equal to WaterHero
    • (Ability being cast) Equal to Ice Shard
  • Actions
    • Region - Center IceShardDamage <gen> on (Target point of ability being cast)
    • Unit - Create 1 IceshardDummy for Player 1 (Red) at (Center of AloreRgn <gen>) facing Default building facing degrees
    • Unit - Turn collision for (Last created unit) Off
    • Unit - Order (Last created unit) to Attack Ground (Target point of ability being cast)
    • Wait 0.30 seconds
    • If InWater Equal to True then (Set ISDamage = (ISDamage + 100))
    • Trigger - Run (ignoring conditions) IceShardDamage
    • Wait 0.70 seconds
    • Unit - Remove (Last created unit) from the game
It triggers but the grunt still dies in one hit, i can't remember how i got it to trigger before but it still one hits the grunt.
 
Status
Not open for further replies.
Top