• 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.

Triggering effect help

Status
Not open for further replies.
Level 6
Joined
Sep 27, 2008
Messages
258
i need help making an effect like this

C=caster -=200 range x=effect E=point clicked


C-x-x-x-x-x-E

if that makes any sense
 
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability being cast equal to YourSpell
  • Actions
    • Set TempPointA = Position of TriggeringUnit
    • Set TempPointB = Target Point of ability being cast
    • Set Facing = Angle Between TempPointA and TempPointB
    • Custom script: call RemoveLocation(udg_TempPointB)
    • For each (integer Variable X) from 1 to 5
      • Do - Actions
        • Set TempPointB = TempPointA offset by (40.0 x X) towards Facing
        • Special Effect - Create special effect on TempPointB using blahblah
        • Custom script: call RemoveLocationudg_TempPointB)
    • Custom script: call RemoveLocation(udg_TempPointA)
note this is if the target point will always be 200 units away, else you need some more calculation for the distance... which I didn't add as I don't like GUI that much... ^_^
 
Level 6
Joined
Sep 27, 2008
Messages
258
ok thanks

i can't find this one

  • Set Facing = Angle Between TempPointA and TempPointB
 
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Set TempLoc[1] = (Position of (Casting unit))
      • Set TempLoc[5] = (Target point of ability being cast)
      • -------- 3 --------
      • Set TempReal[1] = (((X of TempLoc[1]) + (X of TempLoc[5])) / 2.00)
      • Set TempReal[2] = (((Y of TempLoc[1]) + (Y of TempLoc[5])) / 2.00)
      • Set TempLoc[3] = (Point(TempReal[1], TempReal[2]))
      • -------- 2 --------
      • Set TempReal[1] = (((X of TempLoc[1]) + (X of TempLoc[3])) / 2.00)
      • Set TempReal[2] = (((Y of TempLoc[1]) + (Y of TempLoc[3])) / 2.00)
      • Set TempLoc[2] = (Point(TempReal[1], TempReal[2]))
      • -------- 4 --------
      • Set TempReal[1] = (((X of TempLoc[5]) + (X of TempLoc[3])) / 2.00)
      • Set TempReal[2] = (((Y of TempLoc[5]) + (Y of TempLoc[3])) / 2.00)
      • Set TempLoc[4] = (Point(TempReal[1], TempReal[2]))
      • For each (Integer TempIntA) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for Player 1 (Red) at TempLoc[TempIntA] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempLoc[udg_TempIntA])
Heres how I would do it. I just used the midpoint formula
 
Its a waste to use Arrays for this... you could have just used two different real variables and a few TempLocs (you only need three, or even just two if you use another real to find the max distance) and just made the calculation inside the loop... it will be more efficient and faster... TriggeringUnit is also faster than casting unit...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
*Based from Adiktuz's trigger*
If you want an advance calculation which gives an equilibrium for all distance interval for the effects, you should provide a calculation for each distance interval for the effects.

Here is a test map for you, utha.
 

Attachments

  • Wave of Terror.w3x
    13.5 KB · Views: 34
Level 6
Joined
Sep 27, 2008
Messages
258
i can't find this

  • Set Facing = Angle Between TempPointA and TempPointB
 
Level 6
Joined
Sep 27, 2008
Messages
258
i did it was really simple to see how it worked

is there a way to make it so the effects don't take so long to go away?
 
Level 6
Joined
Sep 27, 2008
Messages
258
i am using the Neutral Building Explosion for the effect so it does the explosion which makes a crater after and it takes along time for the crater to go away i just wanted to know how to make it go away faster
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
LoL that thing is Special Effect and it is hard-coded engine in warcraft III and cannot be edited
It is included with its own animation which I cannot alter

Well, you can replace instead of using SFX, you use normal unit acting as dummy (use the file model of the neutral building explosion) and at your trigger, just do this:

  • Removing SFX
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy Unit (NeutralBuildingExplosion)
    • Actions
      • Unit - Remove (Triggering unit) from the game
That way, you can make the explosion goes away if it dies BUT the crater will never go away in short time, because it is naturally occur once the animation is played, the ground will be affected by the crater, leaving an explosion-like area
 
Level 6
Joined
Sep 27, 2008
Messages
258
Bump

for this
  • beam
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Beam
    • Actions
      • Set Caster[2] = (Triggering unit)
      • Set CasterLoc[1] = (Position of Caster[2])
      • Set TargetPoint[1] = (Target point of ability being cast)
      • Set DistancePerWave = 400.00
      • Set Angle = (Angle from CasterLoc[1] to TargetPoint[1])
      • For each (Integer LoopingInteger) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set RealDistance = (RealDistance + DistancePerWave)
          • Set WaveLoc = (CasterLoc[1] offset by RealDistance towards Angle degrees)
          • Special Effect - Create a special effect at WaveLoc using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_WaveLoc)
          • Wait 0.10 seconds
      • Set RealDistance = 0.00
      • Custom script: call RemoveLocation(udg_CasterLoc[1])
      • Custom script: call RemoveLocation(udg_TargetPoint[1])
idk how to make it use a dummy unit instead of the special effect
 
Create dummy at set it's model to special effect you want it to represents.
Make sure field about movement it set to Flying, give it Locust.
If you still do not know how to properly create dummy i can post map with dummy egzample.

  • beam
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Beam
    • Actions
      • Set Caster[2] = (Triggering unit)
      • Set CasterLoc[1] = (Position of Caster[2])
      • Set TargetPoint[1] = (Target point of ability being cast)
      • Set DistancePerWave = 400.00
      • Set Angle = (Angle from CasterLoc[1] to TargetPoint[1])
      • For each (Integer LoopingInteger) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set RealDistance = (RealDistance + DistancePerWave)
          • Set WaveLoc = (CasterLoc[1] offset by RealDistance towards Angle degrees)
          • Unit - Creat 1 dummy at WaveLoc for ((Owner of (Caster[2])) facing Default building facing degrees
          • Unit - Add 0.5 Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_WaveLoc)
          • Wait 0.10 seconds
      • Set RealDistance = 0.00
      • Custom script: call RemoveLocation(udg_CasterLoc[1])
      • Custom script: call RemoveLocation(udg_TargetPoint[1])
Instead of adding expiration timer you can kill unit, but i suggest using expiration timers.
 
Last edited:
Status
Not open for further replies.
Top