• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Storm bolt problem (with Blink)

Status
Not open for further replies.
Level 11
Joined
Dec 31, 2007
Messages
780
i have a skill that is a modified version of Storm bolt (by muradin :p)

my skill has 4000 cast range... is a nice arrow that flies until it hits the target dealing some damage...

What is the problem?... well... the problem is that if the target unit of this skill blinks, the arrow deals no damage at all... it follows the target ... but at the moment of dealing the damage it does nothing... there is no script or anything on this... it is just stormbolt not damaging the target after blinking... any ideas?

PS: ideas may be.. ways to solve this... or another ability that may replace storm bolt (stun+damage)

Thx
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
That is indeed tricky and in other games I've seen it happen and the map makers encourage it as "strategy" :p.

I think you'd need to detect if the target takes damage when hit by the spell and if it doesn't just deal damage to it.

Ask someone who's good at JASS xD
 
Level 11
Joined
Dec 31, 2007
Messages
780
ill see if i can find another skill... if i cant... ill have to create a unit that flies towards the enemy until it reaches the enemy... after that ill make that unit to cast storm bolt on the target :/... big mess for such a simple skill
 
Level 17
Joined
May 6, 2008
Messages
1,598
  • Events
    • Unit - A unit begins the effect of a spell
  • Conditions
    • (Ability being cast) equal to (Storm Bolt (dummy))
  • Actions
    • Set TargetUnit = (Target unit of ability being cast)
    • Unit - Set TargetUnit health -500
 
Level 11
Joined
Dec 31, 2007
Messages
780
but it is not the same... that is instant... and the spell is a golden arrow that flies throu the air (4k distance at 800ms) until it hits the target... dealing damage and a mini-stun... if it would be instant there would be no problem coz the unit wouldnt have time to blink... :/
 
Level 17
Joined
May 6, 2008
Messages
1,598
  • Events
    • Unit - A unit begins the effect of a spell
  • Conditions
    • (Ability being cast) equal to (Storm Bolt (dummy))
  • Actions
    • Set TargetUnit = (Target unit of ability being cast)
    • Set RealWait = 1.5
    • Wait RealWait seconds
    • Unit - Set TargetUnit health -500
Then?
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
I believe the missile speed is <value/sec>? If yes, you need to know the distance between both (I don't do custom spells often so I have no idea how to do that), and the time Storm Bolt takes to be thrown.
So, before dealing the damage you have to Wait ((Distance/800)+(Storm Bolt Casting Time)). I forgot physics formulas so I'm not sure ;P
 
Level 4
Joined
Jun 1, 2007
Messages
92
Trigger moving is flawed as well since if the target unit does not move after the triggers moves it, the missile will continue to hit the previous spot, dealing damage. However, if the target unit does move after the triggered blink spell works, the missile will follow the unit perfectly and deal damage.

My suggestion is to make a unit that moves to the position of the target unit via triggers and cast a stun ability when in near range.
 
Level 11
Joined
Dec 31, 2007
Messages
780
well... i have to say that all the options given above (unfortunately) does not work... i dont know about the one that calculates the distances... but in an AoS map the enemy hero will run away from the arrow in certain situations :S...

my hero casted the arrow.... it followed the enemy... the enemy started to blink ... after it finished... the arrow kept following him... he kept running... after the arrow reached him... it dealt no damage nor mini-stun... i was running the hero from behind with my own hero... so i could watch exactly the moment the arrow reached my enemy and dealt no damage at all :S

My suggestion is to make a unit that moves to the position of the target unit via triggers and cast a stun ability when in near range.

im doing this but im having some troubles... sometimes the dummy unit dies before casting... even if i give sight to the dummy unit or if i share the target unit's sight... this bugg happens when the enemy unit is moving in the oposite direction of the dummy unit

PS: guys... do you think that if i trigger every blink ability in my map ... may work?... or i better trigger the arrow?
 
Level 11
Joined
Dec 31, 2007
Messages
780
well... i was about to comment that a boolean seems to solve my problem... here is what i did...

  • Sagitarius Arrow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sagitarius Arrow (NEW)
    • Actions
      • Set Sagitarius_Arrow_Targ = (Target unit of ability being cast)
      • Set Location3[61] = (Position of (Triggering unit))
      • Unit - Create 1 Sagitarius Arrow ( Dummy Unit ) for (Owner of (Triggering unit)) at Location3[61] facing Default building facing degrees
      • Set Sagitarius_Arrow_Dummy = (Last created unit)
      • Unit - Set level of Sagitarius Arrow 2º Spell (Storm Bolt - Partial Spell) for Sagitarius_Arrow_Dummy to (Level of Sagitarius Arrow (NEW) for Aioros)
      • Trigger - Turn on Sagitarius Arrow Movement <gen>
      • Trigger - Turn on Sagitarius Arrow Target DIES <gen>
      • Trigger - Turn on Sagitarius Arrow Casted True <gen>
      • Custom script: call RemoveLocation(udg_Location3[61])
  • Sagitarius Arrow Movement
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Location3[62] = (Position of Sagitarius_Arrow_Dummy)
      • Set Location3[63] = (Position of Sagitarius_Arrow_Targ)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Location3[62] and Location3[63]) Greater than or equal to 40.00
        • Then - Actions
          • Unit - Move Sagitarius_Arrow_Dummy instantly to (Location3[62] offset by 30.00 towards (Angle from Location3[62] to Location3[63]) degrees)
          • If (((Current flying height of Sagitarius_Arrow_Dummy) Less than or equal to 300.00) and ((Distance between Location3[62] and Location3[63]) Greater than or equal to 2000.00)) then do (Animation - Change Sagitarius_Arrow_Dummy flying height to ((Current flying height of Sagitarius_Arrow_Dummy) + 100.00) at 200.00) else do (Do nothing)
          • If (((Current flying height of Sagitarius_Arrow_Dummy) Greater than or equal to 200.00) and ((Distance between Location3[62] and Location3[63]) Less than 2000.00)) then do (Animation - Change Sagitarius_Arrow_Dummy flying height to ((Current flying height of Sagitarius_Arrow_Dummy) - 100.00) at 200.00) else do (Do nothing)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Sagitarius_Arrow_Targ is in Spell_Imunity_Group) Not equal to True) and (((Sagitarius_Arrow_Targ is Magic Immune) Not equal to True) and ((Sagitarius_Arrow_Targ is in SleepingGroup) Not equal to True))
            • Then - Actions
              • Unit - Grant shared vision of Sagitarius_Arrow_Targ to (Owner of Sagitarius_Arrow_Dummy)
              • Unit - Order Sagitarius_Arrow_Dummy to Stop
              • Unit - Order Sagitarius_Arrow_Dummy to Human Mountain King - Storm Bolt Sagitarius_Arrow_Targ
              • Wait until (Sagitarius_Arrow_Casted Equal to True), checking every 0.10 seconds
              • Unit - Kill Sagitarius_Arrow_Dummy
              • Unit - Remove Sagitarius_Arrow_Dummy from the game
              • Unit - Deny shared vision of Sagitarius_Arrow_Targ to (Owner of Sagitarius_Arrow_Dummy)
              • Set Sagitarius_Arrow_Casted = False
              • Trigger - Turn off (This trigger)
              • Trigger - Turn off Sagitarius Arrow Target DIES <gen>
              • Trigger - Turn off Sagitarius Arrow Casted True <gen>
            • Else - Actions
              • Unit - Kill Sagitarius_Arrow_Dummy
              • Set Sagitarius_Arrow_Casted = False
              • Trigger - Turn off (This trigger)
              • Trigger - Turn off Sagitarius Arrow Target DIES <gen>
              • Trigger - Turn off Sagitarius Arrow Casted True <gen>
      • Custom script: call RemoveLocation(udg_Location3[62])
      • Custom script: call RemoveLocation(udg_Location3[63])

  • Sagitarius Arrow Casted True
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sagitarius Arrow 2º Spell (Storm Bolt - Partial Spell)
    • Actions
      • Set Sagitarius_Arrow_Casted = True
  • Sagitarius Arrow Target DIES
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to Sagitarius_Arrow_Targ
    • Actions
      • Trigger - Turn off Sagitarius Arrow Movement <gen>
      • Unit - Kill Sagitarius_Arrow_Dummy
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Sagitarius Arrow Casted True <gen>
The little boolean "Sagitarius Arrow Casted" seems that has solved my issue... further testing shall tell
 
Level 2
Joined
Jul 3, 2008
Messages
10
I think I know an ability to replace it. Try Firebolt- It stuns a target and deals damage. Its basically equivalent to Storm Bolt- I don't know if it works though. Or perhaps you could change Blink. I don't know.
 
Level 11
Joined
Dec 31, 2007
Messages
780
unfortunatly firebolt is the same as storm bolt... but i solved the issue with the movement trigger i made down here...

so... if at any time you have a problem like this with storm bolt... feel free to use this to solve it ^^
 
Status
Not open for further replies.
Top