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

[Solved] Adding then removing terrain once an ability is cast

Status
Not open for further replies.
Level 4
Joined
Sep 6, 2010
Messages
100
I've figured out how to make different tile-sets appear when an ability is cast, but when I try to remove or replace the tile-set about 5 seconds after the ability is cast... then it's a no go... it doesn't do anything.
 
Level 4
Joined
Sep 6, 2010
Messages
100
SOLVED:
Oh wait, nvm, I just figured it out, here's what I did:

  • Unearth lava 000000000000
    • Events
      • Unit - Shadow 0002 <gen> Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unearth
    • Actions
      • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Environment - Change terrain type at (Target point of ability being cast) to Dungeon - Lava Cracks using variation 0 in an area of size 2 and shape Circle
      • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Set pointofunearth = (Target point of ability being cast)
  • Unearth dirt 000000000000
    • Events
      • Unit - Shadow 0002 <gen> Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unearth
    • Actions
      • Wait 10.00 seconds
      • Environment - Change terrain type at pointofunearth to Dungeon - Dirt using variation 0 in an area of size 2 and shape Circle
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Just combine the 2 triggers, there's no reason to split them.
There are also some leaks: do read up on them.

  • Unearth
    • Events
      • Unit - Shadow 0002 <gen> Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unearth
    • Actions
      • Set UnearthLoc = (Target point of ability being cast)
      • Special Effect - Create a special effect at UnearthLoc using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (last created special effect)
      • Environment - Change terrain type at UnearthLoc to Dungeon - Lava Cracks using variation 0 in an area of size 2 and shape Circle
      • Wait 10.00 seconds
      • Environment - Change terrain type at UnearthLoc to Dungeon - Dirt using variation 0 in an area of size 2 and shape Circle
      • Custom script: call RemoveLocation(udg_UnearthLoc)
      • Custom script: set udg_UnearthLoc = null
 
Level 4
Joined
Sep 6, 2010
Messages
100
Thanks, but why do I have to remove the special effect? Doesn't it remove itself when it finishes playing?
 
Level 4
Joined
Sep 6, 2010
Messages
100
So if you use too many special effects without removing them... then it'll start stuttering like hell eventually, right?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
So if you use too many special effects without removing them... then it'll start stuttering like hell eventually, right?
Not exactly.

When you go into view of the special effects you will place the graphic part of the game engine under immense strain. Even with modern hardware, enough CPU or GPU time may be used that it can no longer produce a game frame in under 0.01667 seconds. The result is that the game will have to drop a frame to compensate (show the same frame many times in a row) to save on the CPU and GPU time so the game plays at a constant rate.

This will only happen when the special effects are in view (even if they appear gone, the models will still exist). Moving the view window away from the special effects will restore game performance to dropping no frames.

Just because you cannot see something does not mean it is still not there. Use on pickup items (runes, tomes, etc) are another example as they kill the item (which makes the visuals appear to disappear but the model still remains at that field position) but both the item and the model associated with it still remain in the session.
 
Status
Not open for further replies.
Top