• 🏆 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!

Vulcan Shot problem

Status
Not open for further replies.
Level 4
Joined
Aug 27, 2007
Messages
127
Hey guys, I need help with a custom spell. It's called Vulcan Shot, and it's supposed to add bonus damage and have a chance to cast Flame Strike. I've based it off Searing Arrows

Here's what I've done for the trigger.

Events
Unit - A unit is attacked
Condition
Attacking unit equal to my guy
Actions
If all conditions are true then do actions else do nothing
Condition - Ability being cast equal to Vulcan Shot
Actions
Set Target = position of attacked unit
Set Location = position of attacking unit
Set Level = level of Vulcan Shot for attacking unit
Set Random = random interger between 1 and 100
If all conditions are true then do actions else do nothing
Condition - Random less than or equal to (Levelx2)+28
Actions
Unit - Create 1 dummy for owner of attacking unit at Location
Unit - Set level of Flame Strike for last created unit to Level
Unit - Add a 3 second expiration timer to last created unit
Unit - Order last created unit to Flame Strike Target

I've also given my dummy the Flame Strike ability, but for some reason it doesn't want to cast it at all. I'd appreciate any help you guys can give me
 
Last edited:
Level 4
Joined
Jul 12, 2007
Messages
116
You should replace
  • Unit - A unit Is attacked

whit

  • Unit - A unit Begins channeling an ability
  • Unit - A unit Begins casting an ability
  • Unit - A unit Finishes casting an ability
  • Unit - A unit Stops casting an ability
  • Unit - A unit Starts the effect of an ability

responding to

  • (Ability being cast) equal to Vulcan Shot

:thumbs_up:
 
Level 4
Joined
Aug 27, 2007
Messages
127
Base an ability off orb of lightning (new) "in item's category"

if u want it for your hero uncheck the "is item ability" and check the "Hero ability" to true

give the ability flamestrike for the effect ability give the percentage and the bonus damage u want. No triggers at all

You just made it worse, now the icon for the Vulcan Shot doesn't show up in my abilities. Aside from that, it still doesn't give off the Flame Strike at all :thumbs_down:
 
Last edited:
ok i got it and tested it

since i couldnt detect when he turns on auto, i detected when he did somthing besides stop and "smart" so here it is

  • Activate Auto
  • Events
    • Unit - A unit is issued an order with no target
  • Conditions
    • (Issued order) Not equal to (Order(stop))
    • (Issued order) Not equal to (Order(smart))
  • Actions
    • Trigger - Turn on Vulcan Shot
    • Trigger - Turn on Deactivate Auto
That turns on vulcan shot and when it turns off

  • Vulcan Shot"initially off"
  • Events
    • Units - A unit is issued an order targeting an object
  • Conditions
  • Actions
    • Set Random = (Random integer number between 1 and 4)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Random Equal to 2
      • Then - Actions
        • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
        • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Position of (Target unit of issued order))
        • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Else - Actions
That will cast 25% of the time, however u can change some areas to your liking

  • Deactivate Auto"initially off"
  • Events
    • Unit - A unit is issued an order with no target
  • Conditions
    • (Issued order) Not equal to (Order(stop))
    • (Issued order) Not equal to (Order(smart))
  • Actions
    • Trigger - Turn off Vulcan Shot
    • Trigger - Turn off (This trigger)
that will turn off the "Vulcan Shot" when ur Searing arrows are deactivated


Just add a dependency condition where it will only work when the certain hero does the event. The only thing that will inferfere with this, is if the same hero with this abil has another abil that has no target point, and if so tell me and i will think of a way to cross those.
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
Admiral Stalfos, I presume?

If I understood your problem correctly, you want to cast a spell which gives bonus damage and a chance to flamestrike on attack?

I think this could work too:
You create a new Spell called "Vulcan Shot" and you base it off roar. You change the ability stats so the area of effect is 001, and the only allowed targets are "self". Now you already have your additional damage for the duration of the spell. Next, you make a new buff based off the "Roar" buff in the buff/efects editor. You change the name to "Vulcan Shot".
Now you go back to the Vulcan Shot ability, and replace the "roar" buff with the "vulcan shot" buff.

Next, you open the trigger editor and create a new trigger:
  • Events
    • Unit - a unit is attacked
  • Conditions
    • And - all conditions are true
      • Conditions
        • Boolean - Attacking unit has "Vulcan Shot" buff equal to true
        • Integer - random integer between 1 and 100 less than or equal to (Level of vulcan shot on attacking unit * 2) + 28
  • Actions
    • Unit - create 1 dummy unit at position of attacking unit
    • Unit - add a 2 seconds expiration timer to last created unit
    • Unit - issue (last created unit) to Human Bloodmage - Flame strike at position of attacked unit
Leaks 2 locations
 
Level 4
Joined
Aug 27, 2007
Messages
127
I hate to admit, but my spell would be much eaiser if I based it on Bash or Critical Strike or the like. All I have to do is find a condition that says "this attack is successful" or whatever, then I'll say if this condition is ture then actions will takes place else nothing happens. The percentages and damage bonuses are there as default.

---------------------------------------------------

Actually never mind, I forgot that Bash has a stun buff. I'll just use that.
 
Last edited:
Level 4
Joined
Aug 27, 2007
Messages
127
Not any more, now that I'm basing it off Bash instead of Searing Arrows

-------------------------------------------------------------------

This is my new trigger

  • unit is attacked
  • attacking unit = my guy
  • set variables location, target and level
  • if unit has vulcan shot buff then do actions
  • create dummy at location facing target
  • add expiration to dummy
  • set level of flame strike for dummy to level
  • order dummy to flame strike target
It still doesn't work. This will be harder than I thought :sad:
And as you can tell, I can't get this trigger posting to work
 
Last edited:
Level 6
Joined
Mar 2, 2006
Messages
306
Quote:
Originally Posted by PurplePoot View Post
B) he has the orders wrong -.- (check out the Turn On and Turn Off orderIDs for your searing arrows ability)
the thing is, when i put the orderIDs in for it, it still didnt work, anyhow, im still trying to make my solution better and more accurate

he meant it for detecting turning arrows on/off, not detecting an attack...

I hate to admit, but my spell would be much eaiser if I based it on Bash or Critical Strike or the like. All I have to do is find a condition that says "this attack is successful" or whatever, then I'll say if this condition is ture then actions will takes place else nothing happens. The percentages and damage bonuses are there as default.
but you can not detect bash or any other passive chanced ability (critical strike, pulverize...)....

carrionman said:
if unit has vulcan shot buff then do actions
unit is attacked fires before the missile actually starts flying... attacked unit is not "really" attacked yet.

And as you can tell, I can't get this trigger posting to work
right-click the trigger name (above events) and choose "copy as text"; paste between [trigger] and [/trigger] ...
 
edge[d1];321286 said:
he meant it for detecting turning arrows on/off, not detecting an attack...


but you can not detect bash or any other passive chanced ability (critical strike, pulverize...)....


unit is attacked fires before the missile actually starts flying... attacked unit is not "really" attacked yet.


right-click the trigger name (above events) and choose "copy as text"; paste between [trigger] and [/trigger] ...

then how do you solve this problem?
 
Level 6
Joined
Mar 2, 2006
Messages
306
then how do you solve this problem?
  • Events
i find orb of lightning to be great idea in theory but totally worthless to mapmakers (doesn't work when unit auto-acquires a target; doesn't work with some unit-targetted spells at all... (on a side-note, orb of slow is even worse) ).

so, you are left with "unit is attacked" event. yes, it is bad but it is all you got. you just need to implement a cooldown to prevent abuse (turn the trigger off, wait 2 game-time seconds, turn it back on). you wouldn't want unit to be able to cause multiple flame strikes in a short time either way.

  • Conditions
the only problem left is trigger condition; you can't just say "unit has searing arrows turned on", but if you can detect turning on/off order then you can maintain (separate trigger) spell's on/off state in a global variable (non-mui) or in unit's custom value or one of its bits (mui), which gives you a condition.

solution two (if you can't or don't want to detect turning arrows on/off): make two dummy non-targetted abilities (like summoning 0 water elementals). let both of them occupy same button position (for example 1,1) - they will be on/off buttons - when "on" spell is activated, remove it from the hero, give him the "off" spell and either turn the main trigger on (non-mui way, no conditions needed) or change unit's custom value (mui way, check unit's custom value in main trigger's condition); do the opposite thing for the "off" spell.
  • Actions
Actions are the least problem here - generate a random number, if it is good, create a dummy to cast a flame strike.
 
Level 4
Joined
Aug 27, 2007
Messages
127
One problem, you need to toss the Melee Initialization trigger, just to make sure no-one else has to. I've taken it out of my version already, so I'll get back to testing. By the way, IT WORKS!!!:thumbs_up: I can work out the rest from here...
---------------------------------------------------------------

Actually, let me rephrase that. I still need to figure out the bonus damage. This is my trigger for the bonus damage

  • Vulcan Shot Bonus Damage
    • Events
    • Conditions
    • Actions
      • Set Level = (Level of Vulcan Shot for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Vulcan Shot ) Equal to True
        • Then - Actions
          • Unit - Add Vulcan Shot (Bonus Damage) to (Triggering unit)
          • Unit - Set level of Vulcan Shot (Bonus Damage) for (Triggering unit) to Level
        • Else - Actions
          • Unit - Remove Vulcan Shot (Bonus Damage) from (Triggering unit)
For obvious reasons, it's not working. I need an event! Can anyone give me one?
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
  • Events
    • Unit - a unit is attacked
  • Conditions
    • And - all conditions are true
      • Conditions
        • Boolean - Attacking unit has "Vulcan Shot" buff equal to true
        • Integer - random integer between 1 and 100 less than or equal to (Level of vulcan shot on attacking unit * 2) + 28
  • Actions
    • Unit - create 1 dummy unit at position of attacking unit
    • Unit - add a 2 seconds expiration timer to last created unit
    • Unit - issue (last created unit) to Human Bloodmage - Flame strike at position of attacked unit

is the original trigger.
What you could add is something like:
unit - make attacking unit damage attacked unit for 2*(level of vulcan shot ability on attacking unit). However, he'll only get the bonus damage when he does a flamestrike too. If you want the bonus dmg to be permanent, do:
  • Events
    • Unit - a unit is attacked
  • Conditions
    • Boolean - Attacking unit has "Vulcan Shot" buff equal to true
  • Actions
    • Unit - make (attacking unit) damage (attacked unit) for X damage
    • If (all conditions are true) then do then actions, else do else actions
      • If - Conditions
        • Integer - random integer between 1 and 100 less than or equal to (Level of vulcan shot on attacking unit * 2) + 28
      • Then - Actions
        • Unit - create 1 dummy unit at position of attacking unit
        • Unit - add a 2 seconds expiration timer to last created unit
        • Unit - issue (last created unit) to Human Bloodmage - Flame strike at position of attacked unit
      • Else - Actions
 
Level 10
Joined
Apr 9, 2004
Messages
502
Hmmm from what he's talked about, you all seem to be simplifying the matter far too much for what it needs. For one thing, no one has utilized the fact that you should detect based on when a unit takes damage rather then when they are attacked, because that also takes care of missing and units dying before contact is made.

Also, there's sort of a bug related with searing arrows that causes units to mess up in attacks.

However that's minor and you can still get a decent effect going

For .GUI you'll need a few triggers, 1 dummy unit, and a dummy flamestrike ability as well as a bunch of other variables and variable types because there are a lot of conditions you'll need to check.

Now I'll use an old spell of mine which is based off of searing arrows, and grants a chance effect on a unit.

I'll just show them as I have them in my editor:

The first one is for single casts because they still count as well, so you'll need to check just casting it once on a unit.

  • Single Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Demoralizing Blow
          • (Casting unit) Equal to DwarfBeserker
          • ((Target unit of ability being cast) belongs to an enemy of (Owner of DwarfBeserker)) Equal to True
          • (Mana of DwarfBeserker) Greater than or equal to 9.00
          • (Random real number between 0.00 and 100.00) Less than or equal to (5.00 + (10.00 x (Real((Level of Demoralizing Blow for DwarfBeserker)))))
    • Actions
      • Set FSStunPoint = (Position of Target unit of ability being cast)
      • Unit - Create 1 Universal Dummy Unit for (Owner of DwarfBeserker) at FSStunPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_FSStunPoint)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Demoralized to (Last created unit)
      • Unit - Set level of Demoralized for (Last created unit) to ((5 x ((Level of Demoralizing Blow for DwarfBeserker) - 1)) + CastCount)
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze Target unit of ability being cast
This is for one cast

Next is for detecting turning it on/off

  • Activate or Deactivate
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Ordered unit) Equal to DwarfBeserker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(flamingarrows))
        • Then - Actions
          • Set FlurryStrikeOn = True
          • Unit - Add Fury Hands to DwarfBeserker
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unflamingarrows))
            • Then - Actions
              • Set FlurryStrikeOn = False
              • Unit - Remove Fury Hands from (Triggering unit)
            • Else - Actions
              • Do nothing




OK NOW IS THE IMPORTANT PART: these next 2 triggers will be what determines a unit taking damage on an incoming attack.

first just detecting unit being attacked....

  • Stun Attempt While active
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Attacking unit) Equal to DwarfBeserker
          • ((Attacked unit) is A structure) Equal to False
          • FlurryStrikeOn Equal to True
          • ((Attacked unit) belongs to an enemy of (Owner of DwarfBeserker)) Equal to True
          • (Mana of DwarfBeserker) Greater than or equal to 9.00
    • Actions
      • Trigger - Turn off Stun While Activated <gen>
      • Set FSChanceStunnedUnit = (Attacked unit)
      • Trigger - Add to Stun While Activated <gen> the event (Unit - FSChanceStunnedUnit Takes damage)
      • Trigger - Turn on Stun While Activated <gen>
and this part deal's the damage...

  • Stun While Activated
    • Events
    • Conditions
      • (Damage source) Equal to DwarfBeserker
    • Actions Set FSStunPoint = (Position of FSChanceStunnedUnit)
      • Unit - Create 1 Universal Dummy Unit for (Owner of DwarfBeserker) at FSStunPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_FSStunPoint)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Demoralized to (Last created unit)
      • Unit - Set level of Demoralized for (Last created unit) to ((5 x ((Level of Demoralizing Blow for DwarfBeserker) - 1)) + CastCount)
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze FSChanceStunnedUnit
      • Trigger - Turn off (This trigger)
Now what you'll get is a fully fucntional activatable orb effect that deals a buff on every attack. You can modifiy that by adding an "if/then/else" function upon dealing damage to setup a chance to deal the effect in a similar fashion as others have already described.

The reason I do it this way is that it detects from only attacking a hero, so you're damaging them when you're supposed to. If you're worried about spells getting in the way, just make sure all triggered damage is from another alternate dummy unit, not your hero, otherwise the other effects could feed the damage trigger instead of damaging from an attack.

check out the spider hero in this map, he's got an ability which is based off of flame arrows and is 100% triggered in terms of effect and similar to the example one I posted (it's older so some stuff might be different, in which case use the newer code).

http://www.freewebs.com/drain_pipe/My war3 files/Newer DPMAOS.w3x
 
Level 10
Joined
Apr 9, 2004
Messages
502
sorry but I rarely visit the forums but when i do, I like to help where I can, I've been doing .GUI for about 3-4 years now, so no one else can better trigger .GUI than I can when it comes to abilities and spells. I'm pretty well informed on all aspects of the stuff, so when people are stuck on problems we've already solved, I feel I need to help bring them up to date. Your problem was overcome years ago, and that testmap is probably 2-3 years old.

still I hope it can help you.
 
Level 10
Joined
Apr 9, 2004
Messages
502
The code or everything? All you'll need is to mimic those triggers, then in the damage trigger, create another point variable on the damaged unit, and create a dummy with the proper flamestrike ability at the right level, and have that unit cast flame strike on the given point, and remove that point.

It's not much different than what I have right now. Still, if that doesn't make sense i'll try and rig somethin up.
 
Level 10
Joined
Apr 9, 2004
Messages
502
The only thing is detecting when the orb goes off. I'm not sure you can do that. It doesn't count as casting an ability I don't think. If it does, then it'd be more work, well for me anyways, but it would basically achieve the same effect, with a little bit less triggering (and the fact that you have the ugly icon on the display as well :( )

Instead of detecting on damaging, you detect on casting, but I'm not sure if that counts as casting though... you can always try it this way.
 
Level 4
Joined
Aug 27, 2007
Messages
127
Drain Pipe, I've just 'translated' the triggers that you sent me so that it works for my spell. This is what I have done so far

  • Vulcan Shot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Vulcan Shot
          • (Casting unit) Equal to Ham 0000 <gen>
          • ((Target unit of ability being cast) belongs to an enemy of (Owner of Ham 0000 <gen>)) Equal to True
          • (Mana of Ham 0000 <gen>) Greater than or equal to (((Real(Level)) x 3.00) + 9.00)
          • (Random integer number between 1 and 100) Less than or equal to (((Level of Vulcan Shot for Ham 0000 <gen>) x 2) + 28)
    • Actions
      • Set Target1 = (Position of (Target unit of ability being cast))
      • Set Location = (Position of (Casting unit))
      • Unit - Create 1 Dummy for (Owner of Ham 0000 <gen>) at Location facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Set level of Flame Strike (Dummy) for (Last created unit) to (Level of Vulcan Shot for (Triggering unit))
      • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike Target1
  • Autocast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Ordered unit) Equal to Ham 0000 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(flamingarrows))
        • Then - Actions
          • Set Activation = True
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unflamingarrows))
            • Then - Actions
              • Set Activation = False
            • Else - Actions
              • Do nothing
  • Chance
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Attacking unit) Equal to Ham 0000 <gen>
          • ((Attacked unit) is A structure) Equal to False
          • Activation Equal to True
          • ((Attacked unit) belongs to an enemy of (Owner of Ham 0000 <gen>)) Equal to True
          • (Mana of Ham 0000 <gen>) Greater than or equal to (((Real(Level)) x 3.00) + 9.00)
    • Actions
      • Trigger - Turn off Flame Strike <gen>
      • Set Target2 = (Attacked unit)
      • Trigger - Add to Flame Strike <gen> the event (Unit - Target2 Takes damage)
      • Trigger - Turn on Flame Strike <gen>
  • Flame Strike
    • Events
    • Conditions
      • (Damage source) Equal to Ham 0000 <gen>
    • Actions
      • Set Target1 = (Position of Target2)
      • Set Level = (Level of Vulcan Shot for (Damage source))
      • Unit - Create 1 Dummy for (Owner of Ham 0000 <gen>) at Location facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Set level of Flame Strike (Dummy) for (Last created unit) to Level
      • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike Target1
      • Trigger - Turn off (This trigger)
I know there are no custom scripts because I haven't dealt with them yet, but is there anything else missing?
 
Level 10
Joined
Apr 9, 2004
Messages
502
you forgot to cleanup points. If you don't then you'll leak big time.

i believe the actions is called "call RemoveLocation(udg_[VARIABLENAME(case sensitive)])" the [] is not included.

anyways You remove points after you're done with them. It's as simple as adding that line of custom text in after you've used the point all it's gonna be used for that.

also, i don't know why you used the "level" variable because you don't need it. Instead, just replace with "level of the ability for [your specific unit]".
 
Status
Not open for further replies.
Top