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

How can i create effect on the water?

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
If you want it to be there from the start of the map, you could just create a new doodad with your desired effect as model and place it wherever you want.
If you want it to show via triggers, then:
- For a permanent effect created by triggers, create a dummy unit (ability locust/invulnerable, not show on minimap, no sight, flying etc) and place that unit wherever you want.
- For a temporary effect, just use "Special effect -create [effect]", it will automatically create the effect on top of the water.

Don't forget to remove memory leaks, as shown in the trigger below:
  • Actions
    • Set tempLoc = (Random point in Region)
    • Special Effect - Create a special effect at tempLoc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
    • Special Effect - Destroy (Last created special effect)
    • Custom script: call RemoveLocation(udg_tempLoc)
 
Level 1
Joined
May 13, 2011
Messages
4
Because i want to create tide skill.This skill casting time 5 second.After 5 seconds , water will erupt.So i need nagaspawn model but i don't know how can i create effect on the water.
 
Create a dummy and give it a Movement Type of "Fly" and change its height to a height that would be visible above water level. Add the model you want in its Art - Model field and give it an expiration timer equal to the birth animation of the model you want to use. If e.g. the water model has an animation time of 2.33 seconds, add such an expiration timing to the unit.
 
Level 1
Joined
May 13, 2011
Messages
4
This don't work these are my codes :
//TESH.scrollpos=1
//TESH.alwaysfold=0
function Trig_Melee_Initialization_Actions takes nothing returns nothing
local unit u = CreateUnit(Player(0), 'Hpal', -3264, 3008, 0)
local integer i = 1
local integer ii = 1
local integer max = 52
local integer max2 = 104
loop
loop
if IsTerrainPathable(GetUnitX(u),GetUnitY(u), PATHING_TYPE_FLOATABILITY) != true then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl", GetUnitX(u), GetUnitY(u)))
endif
call SetUnitX(u, GetUnitX(u) + 128)
exitwhen ii > max
set ii = ii + 1
endloop
call SetUnitX(u, -3264)
call SetUnitY(u, GetUnitY(u) - 128)
set ii = 1
exitwhen i > max2
set i = i + 1
endloop
call RemoveUnit(u)
endfunction

//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
set gg_trg_Melee_Initialization = CreateTrigger( )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Melee_Initialization, Player(0) )
call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction
 
Status
Not open for further replies.
Top