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

Wave of Terror

Status
Not open for further replies.
Level 10
Joined
Sep 11, 2013
Messages
306
How to make wave of terror from dota (vengeful spirit) custom [just destroy trees]
I hope you understand me:D
so..
this is hero -> /\
this is skill -> (1st first special effect) (2nd) (3rd) (4th) (5th)
/\ ->hero begins casting this ability
(1st)[kill tree {200 radius} in first special effect]->

(2nd)[wait 0.5sec] [kill tree {200 radius} in 2nd special effect]->

(3rd)[wait 0.5sec] [kill tree {200 radius} in 3rd special effect]->

(4th)[wait 0.5sec] [kill tree {200 radius} in 4th special effect]->

(5th)[wait 0.5sec] [kill tree {200 radius} in 5th special effect] that's all
 
Level 10
Joined
Sep 11, 2013
Messages
306

Attachments

  • Vengeful.jpg
    Vengeful.jpg
    254.9 KB · Views: 141

Deleted member 242951

D

Deleted member 242951

Its actually very easy ifvyou notice.... So what you need to do is :
1. Create a trigger.
2. Create a point array variable , an integer variable , a real variable and all the required variables that all spells need.
Set *the integer = *any value**
Set *the real * = * angle between casters position and target location*
-- For each integer from pne to the no. of waves do actions :
3. create a dummy / missile unit at *the point* using "Unit - Create Hot-Dummy at *the point* offset by *the integer* towards *the real*
4. Set the point the point = position of the dummy.
5. A wait action to avoid any high speed casts
Thats it for a non MUI version !!!
I cam creat an MUI if you want. But after 16th july. And actually I couldnt use trigger tags because I am currently on phone. :as:
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
You'll need 2 variables.
One real variable called Angle and one array point variable size 3 called CastPoint.
Here are the exact triggers:

  • Wave of Terror
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wave of Terror
    • Actions
      • Set CastPoint[1] = (Target point of ability being cast)
      • Set CastPoint[2] = (Position of (Triggering unit))
      • Set Angle = (180.00 + (Angle from CastPoint[1] to CastPoint[2]))
      • Custom script: call RemoveLocation(udg_CastPoint[1])
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set CastPoint[3] = (CastPoint[2] offset by (250.00 x (Real((Integer A)))) towards Angle degrees)
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at CastPoint[3] facing Angle degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror
          • Custom script: call RemoveLocation(udg_CastPoint[3])
          • Wait 0.05 seconds
      • Custom script: call RemoveLocation(udg_CastPoint[2])
To change the distance between the waves, alter the 250.00
To change the time interval between the waves, alter the wait command value (0.05)
To change the number of waves, change the second number (6) in the For each (Integer A) from 1 to 6, do (Actions) function.
NOTE: This is not MUI
 
Level 12
Joined
May 22, 2015
Messages
1,051
Waits don't work for (For each integer X from Y to Z do (Actions))

You have to put the wait in another trigger and run that.

This is only an issue in enumerating loops (like over players, units, doodads...). If you look at the JASS that gets generated, it makes sense. I won't write it all out, but basically, the integer loop keeps all the code together in one funciton, but the enumeration loop calls a separate function for each thing in the group. They all run separately, so they all wait separately. That's why it appears to wait once and then not any more.

However, Wait 0.05 seconds is probably going to do weird things. It may be fine depending on what you want to do with your map, but it may be inconsistent in speed and will almost always be slower than expected.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Wait 0.05 seconds
That action has a minimum timeout of 0.1 seconds and seems to be affected by network latency (will wait a lot longer in multiplayer).

Waits don't work for (For each integer X from Y to Z do (Actions))
They do work in loop blocks. Just it will break Integer A loops since that uses a common global so any other thread that attempts to run an integer A loop during that time will mess up the loop. The result is not MUI and is very buggy. A local variable should be used instead (not available in GUI, you need to use JASS).

Do be aware that waits do not work in "for unit" and "for player" GUI loops since those are not actual loop blocks. Instead they are iterative function calls and function similar to what one expects from a functional programing language. Using a wait in such a function will cause a thread crash.

The only sensible way to implement this is with 2 triggers. First one handles cast detection. Second one handles creating the effects every 0.05 seconds. This is more accurate than simple Wait and will produce same results in single player as in every multiplayer session.
 
Status
Not open for further replies.
Top