| 03-04-2004, 07:21 PM | #1 |
I'm having some kind of problem with terrain deformations. I create a permanent terrain deformation at a point X over 1 second and set it into a variable Y. In another trigger, I stop the terrain deformation "Y" over 1 second. This never smoothens the terrain, rather, it keeps the terrain deformed. Code:
Avalanche
Events
Unit - Terraformer 0059 <gen> Begins channeling an ability
Conditions
(Ability being cast) Equal to Avalanche (channel)
Actions
Set TempPoint = (Position of Terraformer 0059 <gen>)
Environment - Create a 1.00 second Permanent crater deformation at TempPoint with radius 350.00 and depth -500.00
Set AvalancheDeform = (Last created terrain deformation)
Custom script: call RemoveLocation( udg_TempPoint )
For each (Integer A) from 1 to ((Level of Avalanche (channel) for Terraformer 0059 <gen>) x 10), do (Actions)
Loop - Actions
Set TempPoint = (Position of Terraformer 0059 <gen>)
Set TempPoint2 = (Random point in (Region centered at TempPoint with size (600.00, 600.00)))
Unit - Create 1 Demolisher for (Owner of Terraformer 0059 <gen>) at TempPoint2 facing (Facing of Terraformer 0059 <gen>) degrees
Set AvalancheUnits[(Integer A)] = (Last created unit)
Custom script: call RemoveLocation( udg_TempPoint )
Custom script: call RemoveLocation( udg_TempPoint2 )
Set TempPoint = (Target point of ability being cast)
Set TempPoint2 = (Random point in (Region centered at TempPoint with size (700.00, 700.00)))
Unit - Order (Last created unit) to Attack Ground TempPoint2
Custom script: call RemoveLocation( udg_TempPoint )
Custom script: call RemoveLocation( udg_TempPoint2 )And to stop the terrain deformation/avalanche: Code:
Avalanchestop
Events
Unit - Terraformer 0059 <gen> Stops casting an ability
Conditions
(Ability being cast) Equal to Avalanche (channel)
Actions
Environment - Stop AvalancheDeform over 1.00 seconds
For each (Integer A) from 1 to (10 x (Level of Avalanche (channel) for Terraformer 0059 <gen>)), do (Actions)
Loop - Actions
Unit - Remove Avalanche[(Integer A)] from the gameBoth triggers work properly, but the "Stop X terrain deformation" in the second trigger doesn't work at all... I'm stumped... |
| 03-04-2004, 09:58 PM | #2 |
You have to destroy the deformation, not stop it |
| 03-04-2004, 10:11 PM | #3 | |
Quote:
Well, then, fill me in the function call for destroying the terrain deformation please. There isn't one in the GUI. edit: I want it to smoothen over 1 seconds, not completely disappear immediately. |
| 03-04-2004, 10:40 PM | #4 |
Now that Ive checked, I don't see it. Hmm, I couldve sworn I saw one not to long ago. I dont see why your function isnt working now that ive looked again. Ive never really dealt with terrian deformations much, so I hope someone else could help out more. |
| 03-05-2004, 12:08 AM | #5 |
Well, I did a temporary solution for now. Rather than just destroy the last created deformation, it'll just create another deformation that flattens the terrain. |
