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

How to make this Spell?

Status
Not open for further replies.
Level 6
Joined
Feb 16, 2014
Messages
193
How do i make an ability like Storm Bolt shoot anywhere,if i try to make it shoot and i aim on the ground it says "Must target a unit with this action".How do i make it target the ground?(So i can shoot it anywhere):ogre_hurrhurr:
 
Level 9
Joined
Feb 16, 2011
Messages
595
Ground in available target settings and I recommend putting in vulnerable too if you want it to target everything, but if you want it shot anywhere in the map you need the range increased to the maximum.
 
Level 6
Joined
Feb 16, 2014
Messages
193
Ground in available target settings and I recommend putting in vulnerable too if you want it to target everything, but if you want it shot anywhere in the map you need the range increased to the maximum.

Now it says "Must target a ground unit":vw_wtf:.But i want it to target anything(even if its not a unit)
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
Just saying, "Ground" in this particular box means "land units", if you want to target THE ground you check "Terrain"...

but that does not work with storm bolt as a base ability, try to use shockwave without animations and then trigger it with a dummy unit that moves forward to the targeted location. if you dont know how it works, i can trigger it for you
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
You need a target point ability. Shockwave does line damage so if you want to damage every unit you hit it would work (but I believe it has a hard-coded terrain deformation) perhaps carrion swarm if this is what you are going for.

Otherwise if you want to throw a missile and damage an area when it hits you will need an ability like cluster rockets. Just change the missile art to a storm bolt and what not. If you still want a stun effect you will need to trigger it, which could be a pain because you would need a DDS most likely to know when the missile hits the ground. Then you could have a dummy use a thunder clap-type ability to stun enemies in the desired area.
 
Level 6
Joined
Feb 16, 2014
Messages
193
You need a target point ability. Shockwave does line damage so if you want to damage every unit you hit it would work (but I believe it has a hard-coded terrain deformation) perhaps carrion swarm if this is what you are going for.

Otherwise if you want to throw a missile and damage an area when it hits you will need an ability like cluster rockets. Just change the missile art to a storm bolt and what not. If you still want a stun effect you will need to trigger it, which could be a pain because you would need a DDS most likely to know when the missile hits the ground. Then you could have a dummy use a thunder clap-type ability to stun enemies in the desired area.

I already tried cluster rockets,i didnt like it much because after i make a unit use the cluster rockets then I suddenly make the unit move then the cluster rockets didnt do any damage.
@GIMLI_2 I think i'll just use shockwave for now,but can u show me how to trigger it,so i can use it on my future maps :)
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
WARNING: As I remember this site is not promoting "You do this work for me" but more like "Learn how to do it yourself" I have left this trigger perfectly imperfect :)

First - It is leaking , I leave to you to find how to fix these leaks, I did one point leak as a example. They are pretty easy to fix, you a little bit trickier is to find when to do so. Tip- Remove points after you NO LONGER need them only

Second - The way I handled the dummy unit is silly, find how to implement and use an unit indexer as it will greatly help you to make the impossible possible Edit// Actually in the beginning I did was thinking of doing it like a total ass and not checking if the dummy is alive but... why should I be mean to you ? //EndEdit

Third - Trigger2 actually can handle multiple spells, with a little bit of twitching you can make it do amazing things, for each spell you will only need one initializing trigger, as Trigger1.

Fourth - I will tell you the variable types though:
First let me mention - You do not have to call them the same way, but pls DO NOT call them "a" and "b". The mods will be very grateful to you if you ever decide to submit your work too and any other person working with you or helping you.Give them a reasonable name which is self-explanatory.

STORMYYY = Well this is not a variable but a spell, It is a dummmy spell which does NOTHING except meeting a few conditions. Well it will have mana requirement and cd and a nice icon but it is there only to run Trigger1. You call it Storm Bolt Because your heroes are actualy going to have it and use it. It MUST be based on something which targets terrain. No projectile as you are going to use the dummy unit for that. Just find a nice article on "dummy" things somewhere in the tutorials...

IncreasingInteger = Integer
ThaCasta = Unit w/ array (You can actually recognize arrays by the "[]")
TempPos1 = Point
Temp Pos2 = Point
StormTarget = Point w/ array
Angle = Real w/ array
StormDummy = Unit w/ array
UnitGroupOfProjectiles = Unit Group
TempInteger = Integer // You can use this in any trigger as long as it is instant, same for the other two temp variables
  • Trigger1
  • Event
  • A unit starts the effect of an ability
  • Conditions
  • Ability equal to STORMYYY
  • Event
  • Set IncreasingInteger = IncreasingInteger = 1
  • Set ThaCasta[IncreasingInteger] = Triggering unit
  • Set TempPos1 = unit possition of ThaCasta
  • Set StormTarget[IncreasingInteger] = Target point of ability being cast
  • Set Angle[IncreasingInteger] = point with polar offset >> Angle from pos1 to pos2
  • Create DummyUnit at pos1
  • Custom script - Call RemoveLocation(udg_TempPos1) //We no longer need the point so we remove it as if it stays it leaks, Meaning with longer games it WILL cause lagg
  • Set StormDummy[IncreasingInteger] = Last created unit
  • Unit - Add StormDummy[IncresingInteger] unit to UnitGroupOfProjectiles
  • Trigger - Turn on Trigger2
  • Trigger2
  • Event
  • Every 0.03 seconds of game time
  • Conditions
  • Actions
  • For each (TempInteger) from 1 to IncreasingInteger, do (Actions)
  • Loop - Actions
  • If
    • StormDummy[TempInteger] is alive
      • Then
      • Set TempPos1 = Unit possition of StormDummy[TempInteger]
      • Set TempPos2 = TempPos1 offset by SomeDistanceLike10-40 towards StormAngle[TempInteger] degrees)
      • If
      • Distance betwen points TempPos1 and StormTarget[TempInteger] > (something bigger then the travel distance but not mor then twice, the perfect is ~42-44)
        • Then
        • Unit - Move StormDummy[IncreasingInteger] to TempPoint
        • Else - Make ThaCasta deal the damage and kill the dummy
    • Else - (Here actualy ends the first if then else, the rest is outside it)
  • If Number of units in UnitGroupOfProjectiles = 0
    • Then
    • turn off this trigger
    • Set IncreasingIntger = 0
    • Else
 
Last edited:
If you haven't been able to learn from any of the other posts yet here is your answer.

[trigger=OnCast]
Catch
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Storm Bolt
Actions
Set sbdex = (sbdex + 1)
Set sbcaster[sbdex] = (Triggering unit)
Set sbtargetpoint[sbdex] = (Target point of ability being cast)
Set sbp = (Position of sbcaster[sbdex])
Unit - Create 1 Dummy for Neutral Passive at sbp facing (Angle from sbp to sbtargetpoint[sbdex]) degrees
Set sbu[sbdex] = (Last created unit)
Unit - Move sbu[sbdex] instantly to sbp
Custom script: call RemoveLocation(udg_sbp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
sbdex Equal to 1
Then - Actions
Custom script: call TimerStart(udg_sbtimer, 0.031250000, true, null)
Else - Actions

[/trigger]
[trigger=Anywhere Storm Bolt]
Move
Events
Time - sbtimer expires
Conditions
Actions
For each (Integer sbloop) from 1 to sbdex, do (Actions)
Loop - Actions
Set sbp = (Position of sbu[sbloop])
Set sbgroup2 = (Units within 64.00 of sbp matching ((((Matching unit) is dead) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of sbcaster[sbloop])) Equal to True) and (((Matching unit) is Ethereal) Equal to False))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between sbp and sbtargetpoint[sbloop]) Greater than or equal to 25.00
(Number of units in sbgroup2) Equal to 0
Then - Actions
Set sbp2 = (sbp offset by 20.00 towards (Angle from sbp to sbtargetpoint[sbloop]) degrees)
Unit - Move sbu[sbloop] instantly to sbp2
Custom script: call RemoveLocation(udg_sbp2)
Else - Actions
Set sbgroup = (Units within 128.00 of sbp matching (((Matching unit) is dead) Equal to False))
Unit Group - Pick every unit in sbgroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of (Owner of sbcaster[sbloop])) Equal to True
Then - Actions
Unit - Cause sbcaster[sbloop] to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Universal
Else - Actions
Custom script: call DestroyGroup(udg_sbgroup)
Unit - Kill sbu[sbloop]
Set sbcaster[sbloop] = sbcaster[sbdex]
Set sbcaster[sbdex] = No unit
Set sbu[sbloop] = sbu[sbdex]
Set sbu[sbdex] = No unit
Custom script: call RemoveLocation(udg_sbtargetpoint[udg_sbloop])
Set sbtargetpoint[sbloop] = sbtargetpoint[sbdex]
Set sbdex = (sbdex - 1)
Set sbloop = (sbloop - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
sbdex Equal to 0
Then - Actions
Countdown Timer - Pause sbtimer
Else - Actions
Custom script: call DestroyGroup(udg_sbgroup2)
Custom script: call RemoveLocation(udg_sbp)

[/trigger]
 

Attachments

  • anywhere stormbolt.w3x
    21.4 KB · Views: 32
Level 12
Joined
Mar 24, 2011
Messages
1,082
@Mythic The group is for clearing the index, though I forgot to kill the dummy and remove it from the group, aaand the group is after the loop... sry dont have war 3 to make proper trigger/text, and as I said this is a very poorly designed trigger for him to learn and not make other people do his work, if he cant he will find a coder to work with.

@Dat-C3 Seriously... dude... (Meme which I don't want to search for and post) Why you no read the text in red ??
 
Last edited:
@Dat-C3 Seriously... dude... (Meme which I don't want to search for and post) Why you no read the text in red ??

Simple, I never liked learning that way and learned far better looking off of peoples demo maps/examples. There is more then one type/method of learning.

Sounds like you didn't read my post either. :thumbs_up:
 
Status
Not open for further replies.
Top