• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Smoke Bomb type of spell

Status
Not open for further replies.
Level 3
Joined
Jul 25, 2014
Messages
31
Hey, can anyone please help me with a spell I'm trying to make.

The spell is a Smoke Bomb, an AOE debuff spell. Basically it should make an Cloud animation within area of 250, which gives enemy units who enter the smoke area chance to miss by 75% (but only while in it!), and makes friendly units inside of it un attackable by ranged attacks (again, only when they are in it).

I am a total noob at triggering, however I kinda know in theory how to make this, but don't know the actual coding and stuff.

I would be very grateful if someone could help me with triggered spells on this map I'm making :ogre_kawaii:
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
You're actually talking about a spell like the one that Rikimaru has.
Well, pick all units within area 250 of target point of spell being casted, and add to them a dodge ability ( you make a custom one in Object Editor and set dodging chance to 75 % ) ... For the option of not being attackable by ranged units, I don't know that exactly, but you can respond to any units within 3000 range radius max and whenever they are issued to attack whoever inside the smoke , you order them to stop. I don't think there is another solution for range thingy :/.

NOTE : You can also slow down units inside smoke , you merely set (Picked Unit)'s movement speed to (100) for example under the loop of picking units to add dodge, but this time you pick enemies units not friendly basically.

EDIT : You can make a request of this spell in Requests section
Good Luck
 
Level 3
Joined
Jul 25, 2014
Messages
31
You're actually talking about a spell like the one that Rikimaru has.
Well, pick all units within area 250 of target point of spell being casted, and add to them a dodge ability ( you make a custom one in Object Editor and set dodging chance to 75 % ) ... For the option of not being attackable by ranged units, I don't know that exactly, but you can respond to any units within 3000 range radius max and whenever they are issued to attack whoever inside the smoke , you order them to stop. I don't think there is another solution for range thingy :/.

NOTE : You can also slow down units inside smoke , you merely set (Picked Unit)'s movement speed to (100) for example under the loop of picking units to add dodge, but this time you pick enemies units not friendly basically.

EDIT : You can make a request of this spell in Requests section
Good Luck

Yeah, but if they leave the cloud they will still have the buff, which is not a point of this spell. The same is for enemies, I know how to cast mass Drunken Haze on them, but it's not the point, the point is that buff/debuff ONLY appears to those inside the smoke cloud. And I can't figure out how to do that :vw_unimpressed:
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Yeah, but if they leave the cloud they will still have the buff, which is not a point of this spell. The same is for enemies, I know how to cast mass Drunken Haze on them, but it's not the point, the point is that buff/debuff ONLY appears to those inside the smoke cloud. And I can't figure out how to do that :vw_unimpressed:

Can you base your spell off of Cloud? You'd set the damage to zero. Units only have the Cloud buff if they remain in the target area. All you need to do is check to see if they have a buff and if they do add your evasion effects to those units with the buff. [Ref1] & [Ref2].

The Cloud ability has modifiers to determine whether damage is entirely prevented or if a chance to miss is present - as well as reducing attack speed & movement speed. Just change the allowed targets to include more than structures.

//\\o0//\\
 
Level 3
Joined
Jul 25, 2014
Messages
31
Can you base your spell off of Cloud? You'd set the damage to zero. Units only have the Cloud buff if they remain in the target area. All you need to do is check to see if they have a buff and if they do add your evasion effects to those units with the buff. [Ref1] & [Ref2].

The Cloud ability has modifiers to determine whether damage is entirely prevented or if a chance to miss is present - as well as reducing attack speed & movement speed. Just change the allowed targets to include more than structures.

//\\o0//\\

Hmm. Yeah I guess Cloud ability would be a good start. However, it puts a negative buff on enemy units, how do I add positive buff (evasion) to allied units? It also prevents ranged attacks that are INSIDE cloud, but units that are outside the cloud are still able to attack with normal hit chance. This spell has been bugging me for two days, and being a noob at GUI doesn't help. :vw_sleep:









EDIT 1: Actually, by default I can make enemy units miss when affected by cloud, so evasion buff is not really needed, aslong as I find a way to prevent ranged attacks on allied units inside the cloud. (And to figure out how exactly to make a channeled spell non-channeled.)

EDIT 2: Yeah, I actually have absolutely no idea how to trigger this.
ibbaRRaKnKXTRp.gif


EDIT 3: Here's my map, this is the only thing I was able to do, and the spell does nothing. Life is so unpredictable and cruel.
ibbaRRaKnKXTRp.gif
 

Attachments

  • Smoke Bomb test.w3x
    26.2 KB · Views: 75
Last edited:
I made a spell like this for World in Flames. What i did was, when smoke grenade was cast, i added all units in range to a group and also gave them the dodge ability. Then, i checked every second if the units in the group were still in range of the grenade, and if not, i removed them from the group and removed the dodge ability. I also checked if any other units were in range and added them to the group/added ability.

The problems you might encounter are making it MUI, since GUI triggers have poor support for this. Just make a trigger that runs every 1 second, inside it, pick all units of type [smoke grenade dummy], range units in range of picked unit and add them to [smoke grenade group] + add dodge ability. second, pick all units in [smoke grenade] and check if they are in range of ANY smoke grenade (not just the one), and if not, remove them from the group + remove ability. Remember to clean group leaks.

Option 2: create dummy unit with x seconds timed life at the spell target loc. Give it a dummy aura ability with no effect. Every second, group all units on the map. If they have the custom dummy buff, give them the dodge ability. If not, remove it. Might be more simple to you. Once again, use "custom script: set udg_wantDestroyGroup = true" before you use any actions dealing with unit groups, to prevent leaks.
 
Level 3
Joined
Jul 25, 2014
Messages
31
I made a spell like this for World in Flames. What i did was, when smoke grenade was cast, i added all units in range to a group and also gave them the dodge ability. Then, i checked every second if the units in the group were still in range of the grenade, and if not, i removed them from the group and removed the dodge ability. I also checked if any other units were in range and added them to the group/added ability.

The problems you might encounter are making it MUI, since GUI triggers have poor support for this. Just make a trigger that runs every 1 second, inside it, pick all units of type [smoke grenade dummy], range units in range of picked unit and add them to [smoke grenade group] + add dodge ability. second, pick all units in [smoke grenade] and check if they are in range of ANY smoke grenade (not just the one), and if not, remove them from the group + remove ability. Remember to clean group leaks.

Option 2: create dummy unit with x seconds timed life at the spell target loc. Give it a dummy aura ability with no effect. Every second, group all units on the map. If they have the custom dummy buff, give them the dodge ability. If not, remove it. Might be more simple to you. Once again, use "custom script: set udg_wantDestroyGroup = true" before you use any actions dealing with unit groups, to prevent leaks.


Could you please post the actual trigger? I'm afraid I don't know anything about group triggers :cconf:


Making ranged units stop isn't going to work if they re-acquire the units inside the bomb as attack targets - it will keep on running several times. A workaround would be ordering range d units to enter the cloud if they try attack something inside it.

What about triggering an Anti-Magic Shell type of buff for units inside the cloud but instead magic, it affects ranged attacks also? Like in theory I kinda know how to do it but my trigger knowledge is very low, especially concering giving/removing certain buff.
 
Uhm, there are several ways of unabling ranged attacks to deal damage to a unit. For instance, you can modify Hardened Skin to skip 1000 damage down to a minimum of 0, and make it only affect ranged attacks. Elunes grace is another ability which can be used to reduce or remove the damage dealt by piercing or magic attacks, so it could come in handy provided that all ranged untis in your map use piercing damage.

One thing i do NOT recommend is trying to intercept attack orders and ordering the unit to stop if it is attacking a unit inside smoke. The problem with this is that even though you order them to stop, units will aquire their target multiple times per second, and will try to target it even though there are other available targets nearby.

For the spell trigger, i suggest you study some grenade spell triggers in the spells section. The principle is the same, except when the grenade lands, you create a dummy unit (just a custom unit which is invulnerable, invisible and unselectable, OR, you can make it not invisible and give it the smoke model), apply timed life equal to the duration of the smoke cloud (this action can be found under "units"), give it a modified aura ability (like elunes grace, or whichever you choose, make sure it uses a custom buff made by you). Also, you need a trigger which, every 1 second of the game, picks all units of type (whatever unit can be affected by smoke, like infantry, non-structure, whatever narrows it down), check if "Unit has buff [your buff]", and if so, add [evasion ability], if not, remove [evasion ability].
 
Level 3
Joined
Jul 25, 2014
Messages
31
Thanks for the answers. However, I think idea by Fingolfin seems the easiest one for me and my knowledge of triggers.

Uhm, there are several ways of unabling ranged attacks to deal damage to a unit. For instance, you can modify Hardened Skin to skip 1000 damage down to a minimum of 0, and make it only affect ranged attacks. Elunes grace is another ability which can be used to reduce or remove the damage dealt by piercing or magic attacks, so it could come in handy provided that all ranged untis in your map use piercing damage.

One thing i do NOT recommend is trying to intercept attack orders and ordering the unit to stop if it is attacking a unit inside smoke. The problem with this is that even though you order them to stop, units will aquire their target multiple times per second, and will try to target it even though there are other available targets nearby.

For the spell trigger, i suggest you study some grenade spell triggers in the spells section. The principle is the same, except when the grenade lands, you create a dummy unit (just a custom unit which is invulnerable, invisible and unselectable, OR, you can make it not invisible and give it the smoke model), apply timed life equal to the duration of the smoke cloud (this action can be found under "units"), give it a modified aura ability (like elunes grace, or whichever you choose, make sure it uses a custom buff made by you). Also, you need a trigger which, every 1 second of the game, picks all units of type (whatever unit can be affected by smoke, like infantry, non-structure, whatever narrows it down), check if "Unit has buff [your buff]", and if so, add [evasion ability], if not, remove [evasion ability].

So, if I understood correctly,

I need to make a Hero base ability (i like to use Channel) and set it to instant cast with an area of effect 200. When casted, add the dummy like you said. I really like the idea of Hardened Skin use. But I don't know how to "pick units" and I dont know how to add a buff to an unit. :vw_sad:

So please, if you have time, could you write a trigger down?

p.s. it would be a better effect if ranged units stopped attacking units inside of cloud.. is this kind of trigger even possible?
-Event: Unit starts the effect of ability

-Condition: Ability being cast equal to Smoke Bomb

-Action pick all (ranged) units within a 3000 range

Condition if friendly units are within that range
-Give an invisible taunt to friendly units that have no Smoke Bomb buff with area of effect 1000
-Else (no friendly units) set Acquisition range to 200 for duration of cloud so they won't auto attack again.

But this sounds so messy, your idea is more logical although ranged units will still attack unit in Smoke Bomb... anyways, could you please write the trigger down? I think I will learn much from it.
 
Status
Not open for further replies.
Top