Spell A simple GUI Powershot

Dinowc

don't expect anything, prepare for everything
Reaction score
223
GUI Powershot

SPELL UPDATED
_____________________
here's my GUI Powershot (not the exact Windrunner's powershot but almost :p)

Good stuff:
MUI
Leakless
Lagless
Levelable

Bad stuff:
First time cast lag
Made in GUI :D
Ugly code and terrain? :p

How to import:
1. Download and open the map, and copy EVERY trigger into your map's trigger editor
2. Copy the units from the object editor, although you don't need the caster but the Arrow dummy unit
3. Make sure you have the Vexorian's dummy model, if you don't, export the dummy from the map in import manager and import it into your map
4. Finally, copy the ability called Powershot and give it to the unit
5. Change names of the variables (recommended) because the names listed bellow are too common

if you got any problems importing, PM me!


Powershot
Fires an arrow with deadly precision at target location piercing trough any enemy unit along the way damaging them. The damage dealt is greatest to the first target it hits and is reduced by 15% with each other it passes through.
Cast range - 1500.

Level 1 - Deals 150 damage to the first target.
Level 2 - Deals 225 damage to the first target.
Level 3 - Deals 300 damage to the first target.
Level 4 - Deals 375 damage to the first target.

damn arrow is fast so I couldn't make better screenshots xd
44608050.jpg

14298966.jpg

ouch! that hurts :p
38813590.jpg

projectiles :D

Trigger:
  • Powershot cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Powershot
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_count Less than (<) 1000
        • Then - Actions
          • Set MUI_count = (MUI_count + 1)
        • Else - Actions
          • Set MUI_count = 0
      • Set Caster_pos = (Position of (Triggering unit))
      • Set Target_point[MUI_count] = (Target point of ability being cast)
      • Set Caster_offset = (Caster_pos offset by 75.00 towards (Facing of (Triggering unit)) degrees)
      • Set Distance[MUI_count] = (Distance between Caster_offset and Target_point[MUI_count])
      • Set Real[MUI_count] = 0.00
      • Set Angle[MUI_count] = (Angle from Caster_offset to Target_point[MUI_count])
      • Unit - Create 1 Arrow dummy for (Owner of (Triggering unit)) at Caster_offset facing Angle[MUI_count] degrees
      • Set Arrow[MUI_count] = (Last created unit)
      • Special Effect - Create a special effect attached to the origin of Arrow[MUI_count] using Abilities\Weapons\BallistaMissile\BallistaMissile.mdl
      • Set Arrow_effect[MUI_count] = (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of Arrow[MUI_count] using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
      • Set Trail_effect[MUI_count] = (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of Arrow[MUI_count] using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
      • Set Trail_effect2[MUI_count] = (Last created special effect)
      • Unit - Add Crow Form to Arrow[MUI_count]
      • Unit - Remove Crow Form from Arrow[MUI_count]
      • Animation - Change Arrow[MUI_count] flying height to 60.00 at 0.00
      • Unit - Set the custom value of Arrow[MUI_count] to MUI_count
      • Unit Group - Add Arrow[MUI_count] to Arrow_group
      • Set Arrow_damage[MUI_count] = (75.00 + (75.00 x (Real((Level of Powershot for (Triggering unit))))))
      • Custom script: call RemoveLocation(udg_Caster_pos)
      • Custom script: call RemoveLocation(udg_Target_point[udg_MUI_count])
      • Custom script: call RemoveLocation(udg_Caster_offset)

Trigger:
  • Powershot effect
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • (Number of units in Arrow_group) Greater than (>) 0
    • Actions
      • Unit Group - Pick every unit in Arrow_group and do (Actions)
        • Loop - Actions
          • Set Arrow_value = (Custom value of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Real[Arrow_value] Less than (<) Distance[Arrow_value]
            • Then - Actions
              • Set Arrow_pos = (Position of (Picked unit))
              • Set Arrow_offset = (Arrow_pos offset by 50.00 towards Angle[Arrow_value] degrees)
              • Unit - Move Arrow[Arrow_value] instantly to Arrow_offset
              • -------- -------- --------
              • Special Effect - Create a special effect at Arrow_pos using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
              • Set TempSFX = (Last created special effect)
              • Trigger - Run Powershot SFX Trail <gen> (ignoring conditions)
              • -------- -------- --------
              • Set Damage_group = (Units within 80.00 of Arrow_offset matching ((((Matching unit) is in Already_damaged[Arrow_value]) Equal to (==) False) and ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) belongs to an enemy of (Owner of Arrow[Arrow_value])) E
              • Unit Group - Pick every unit in Damage_group and do (Actions)
                • Loop - Actions
                  • Unit - Cause Arrow[Arrow_value] to damage (Picked unit), dealing Arrow_damage[Arrow_value] damage of attack type Normal and damage type Normal
                  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Floating Text - Create floating text that reads ((String((Integer(Arrow_damage[Arrow_value])))) + !) above (Picked unit) with Z offset 50.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                  • Unit Group - Add (Picked unit) to Already_damaged[Arrow_value]
                  • Set Arrow_damage[Arrow_value] = (Arrow_damage[Arrow_value] x 0.85)
              • Destructible - Pick every destructible within 80.00 of Arrow_pos and do (Destructible - Kill (Picked destructible))
              • Custom script: call RemoveLocation(udg_Arrow_pos)
              • Custom script: call RemoveLocation(udg_Arrow_offset)
              • Custom script: call DestroyGroup(udg_Damage_group)
              • Set Real[Arrow_value] = (Real[Arrow_value] + 50.00)
            • Else - Actions
              • Special Effect - Destroy Arrow_effect[Arrow_value]
              • Special Effect - Destroy Trail_effect[Arrow_value]
              • Special Effect - Destroy Trail_effect2[Arrow_value]
              • Unit Group - Remove Arrow[Arrow_value] from Arrow_group
              • Unit Group - Remove all units from Already_damaged[Arrow_value]
              • Unit - Add a 0.03 second Water Elemental expiration timer to Arrow[Arrow_value]

part of the conditions in the upper trigger are missing (in the Damage_group), and those are VERY important
I suggest you to dl the map and see the full trigger
Trigger:
  • Powershot SFX Trail
    • Events
    • Conditions
    • Actions
      • Custom script: local effect e = udg_TempSFX
      • Wait 1.50 seconds
      • Custom script: set udg_TempSFX = e
      • Special Effect - Destroy TempSFX
      • Custom script: set e = null


here is the map

View attachment 29946
_____________
thanks to Tom Kazansky who did some changes
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
I think the arrow projectile is the missile of Ballista (the siege unit of Night Elf from RoC), its path is Abilities\Weapons\BallistaMissile\BallistaMissile.mdl
And path of the effect trail is Abilities\Spells\Other\Tornado\Tornado_Target.mdl

To add the effect trail, it's quite easy. just use some Custom Script:
Trigger:
  • Powershot SFX Trail
    • Events
    • Conditions
    • Actions
      • Custom script: local effect e = udg_TempSFX
      • Wait 2.00 seconds
      • Custom script: set udg_TempSFX = e
      • Special Effect - Destroy TempSFX
      • Custom script: set e = null

Create a variable named TempSFX, type Special Effect. After create the effect at the position of the arrow, Set TempSFX = (Last Created Special Effect) then run the above trigger (ignoring the condition).
 

Azlier

Old World Ghost
Reaction score
461
>Or just make them as a unit and give them a experation timer.

Units take more processing power than special effects, because the computer has to calculate health, user data, mana, regeneration, armor, mana regeneration, buffs, timers, orders, facing, flying height... You get the idea.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
solved.
_____
Create a variable named TempSFX, type Special Effect. After create the effect at the position of the arrow, Set TempSFX = (Last Created Special Effect) then run the above trigger (ignoring the condition).

since arrow model doesn't have any attachment points I couldn't attach the special effect on it

creating the effect at arrow's position creates the effect under the arrow and it looks bad

1 way would be making another dummy with the effect's model, but then the spell wouldn't be so "simple" anymore...

so +rep to anyone that finds the 2nd way :p
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
@Dinowc, I don't think it looks bad.
I have modified your spell (a bit), have a look at the map.

>the spell wouldn't be so "simple" anymore...

yes, of course.
 

Attachments

  • Powershot (modified).w3x
    30.5 KB · Views: 286

Dinowc

don't expect anything, prepare for everything
Reaction score
223
I don't think it looks bad.

woops my bad :p

anyway I did it like you said and it works
but the delay in creating the effect is annoying xd
it takes like a second before it's created (or is it like that in Dota too?)
 

Kenny

Back for now.
Reaction score
202
There is another option.

Find the Dummy model made by Vexorian. It has something like 280 attachment points.

Attach the projectile model to its chest and then you have your projectile.

Then just add the effect to the unit every interval.

Not sure how that will look though, but it is an alternative.

Im pretty sure the one in DotA creates the special effect at the units location, not attached to the unit, and it isnt destroyed immediately.

However, DotA uses vJASS, so they can easily create a struct or something to play the effects full animation.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
EDIT: ok I did some changes after all xD
thanks a bunch to Tom Kazansky (I already +repped you)
 

Viikuna

No Marlo no game.
Reaction score
265
Last time I checked DotA used handle vars styled gamecache with I2H, but since that function is so dangerous IceFrog has probably moved to use some struct like data structures.


I remember that some guy wrote that IceFrog just use some sized arrays ( something like vJass big arrays ) and H2I(handle)-0x100000 as an array index.

Anyways, if you use Vexorians dummy model, you could maybe attach both arrow and cyclone effect model to it. edit. oH kenny! said this already.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
I see everybody talking about that Vexorian's dummy model

where is it? where do I find it? I searched here on forums, on hive...

cause I really need an invisible model with attachment points to improve the spell and make it look better
 

Kenny

Back for now.
Reaction score
202
I am quite sure that Dota uses JASS with alot of game caches and not vJass?

They ported to vJASS a while ago im pretty sure. However they still use some weird type of attachment, instead of something like TimerUtils or something.

If you dont want to go over to wc3c, from the top of my head, i think that Romek's Panda Roll and Flares Phantasmal Barrage spell uses Vexorians dummy model. Just download that map, and export i from the map. Theres a link to Flares spell in his sig above this post.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
lol can you stick with the thread? :D


btw I made some changes to the spell
 

BlackRose

Forum User
Reaction score
239
Powershot ||| DotA's Powershot
  • It's slower.
  • It travels only for to the target location. ||| DotA: Moves 1700 in the targeted angle.
  • It has blood effects on target.
  • It has floating text.
  • It has no channelling. ||| DotA: Has 1 second channelling.

It uses a lot of variables, what if I already have same variable names? GUI is quite limited :)

[ REP + ]
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
I said [here's my GUI Powershot] not [here's Dota's GUI Powershot] :p

It's slower.
it can be easily fixed
It travels only for to the target location. ||| DotA: Moves 1700 in the targeted angle.
I think it's better that way
It has blood effects on target.
I think it looks better + you can actually know if you hit the target (in Dota you don't know)
It has floating text.
it can be removed, I only added it so you can see how much damage a unit is inflicted
It has no channelling. ||| DotA: Has 1 second channelling.
just give the spell casting time and it's ok, but I wanted it like I did
what if I already have same variable names?
change variable names? :rolleyes:


thx for feedback ;)

+rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top