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

Unit moves,ground shakes

Status
Not open for further replies.
Level 10
Joined
Jul 16, 2012
Messages
410
Could anyway(if posssible)post me the triggers that when a unit(specific unit,only 1)moves with every step he makes make the ground shake,something like imagine if you saw a titan and he moves and with every his step the ground shakes?Oh and the shaking to be effected only his AOE,so if like a titan is on the edge on the left on the map and moves theres the shaking and if im on the right egde of the map im not effected by that(my camera is stable)?
Could any1 please help me?
 
Variables
  1. "Unit" of type unit.
  2. "current_coord" of type real array.
  3. "last_pos" of type point.

ripple is initially off.

  • ripple
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Custom script: local real x
      • Custom script: local real y
      • Set Unit = Blood Mage 0002 <gen>
      • Custom script: set x = GetUnitX(udg_Unit)
      • Custom script: set y = GetUnitY(udg_Unit)
      • Custom script: if (x == udg_current_coord[0] and y == udg_current_coord[1]) then
      • Trigger - Turn off ripple <gen>
      • Skip remaining actions
      • Custom script: endif
      • Custom script: set udg_current_coord[0] = x
      • Custom script: set udg_current_coord[1] = y
      • Set last_pos = (Position of Unit)
      • Environment - Create a 1.00 second Normal ripple deformation at last_pos with starting radius 1024.00, ending radius 512.00, and depth 32.00, using 1.00 second ripples spaced 256.00 apart
      • Custom script: call RemoveLocation(udg_last_pos)
  • order
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Custom script: if (GetOrderPointX() == 0) then
      • Trigger - Turn off ripple <gen>
      • Custom script: else
      • Trigger - Turn on ripple <gen>
      • Custom script: endif
You may want to improve on it yourself I wrote it pretty fast.
 
Last edited:
Status
Not open for further replies.
Top