• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Some spell triggering problems.

Status
Not open for further replies.
Level 3
Joined
May 10, 2008
Messages
52
Ahh, i am working on my spell for my rpg map but some things don't work, like the sound and unit creation (effects), well, here it is. . .
  • Shadow phantasm
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Phantasm
    • Actions
      • Sound - Stop music After fading
      • Wait 0.25 seconds
      • Sound - Play AcolyteMining <gen> at 100.00% volume, attached to (Casting unit)
      • Wait 2.00 seconds
      • Camera - Shake the camera for Player 1 (Red) with magnitude 15.00
      • Cinematic - Fade out and back in over 5.00 seconds using texture ReaverSmoke2.blp and color (0.00%, 90.00%, 100.00%) with 15.00% transparency
      • Wait 1.50 seconds
      • Camera - Stop swaying/shaking the camera for Player 1 (Red)
      • Wait 0.50 seconds
      • Sound - Play StarfallCaster1 <gen> at 100.00% volume, attached to (Casting unit)
      • Unit - Create 1 effect 3 for Player 1 (Red) at (Target point of ability being cast) facing Default building facing degrees
      • Wait 3.00 seconds
      • Unit - Create 1 effect 2 for Player 1 (Red) at (Target point of ability being cast) facing Default building facing degrees
      • Wait 2.00 seconds
      • Unit - Create 1 effect 1 for Player 1 (Red) at (Target point of ability being cast) facing Default building facing degrees
      • Wait 2.00 seconds
is there something wrong here, because the efffects don't work and the sound, pls help me. . .
 
Last edited by a moderator:
Level 28
Joined
Mar 25, 2008
Messages
2,955
Euch - i'll fix it.

  • Shadow phantasm
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Shadow Phantasm
  • Actions
    • Set tempunit = (Casting unit)
    • Set temppoint1 = (Target point of ability being cast)
    • Sound - Stop music After fading
    • Wait 0.25 seconds
    • Sound - Play AcolyteMining <gen> at 100.00% volume, attached to tempunit
    • Wait 2.00 seconds
    • Camera - Shake the camera for (Owner of tempunit) with magnitude 15.00
    • Cinematic - Fade out and back in over 5.00 seconds using texture ReaverSmoke2.blp and color (0.00%, 90.00%, 100.00%) with 15.00% transparency
    • Wait 1.50 seconds
    • Camera - Stop swaying/shaking the camera for (Owner of tempunit)
    • Wait 0.50 seconds
    • Sound - Play StarfallCaster1 <gen> at 100.00% volume, attached to tempunit
    • Unit - Create 1 effect 3 for (Owner of tempunit) at temppoint1 facing Default building facing degrees
    • Unit - Add a 3 seconds standard expiration timer to (last created unit)
    • Wait 3.00 seconds
    • Unit - Create 1 effect 2 for Player 1 (Owner of tempunit) at temppoint1 facing Default building facing degrees
    • Unit - Add a 3 seconds standard expiration timer to (last created unit)
    • Wait 2.00 seconds
    • Unit - Create 1 effect 1 for Player 1 (Owner of tempunit) at temppoint1 facing Default building facing degrees
    • Unit - Add a 3 seconds standard expiration timer to (last created unit)
    • Custom script: call RemoveLocation(udg_temppoint1)
The problem lies within the waits (as so often) because most of the event responses can't be used after a wait so one puts them into a variable to 'store' them. Also the trigger "leaks" (means fills up your memory [ http://www.hiveworkshop.com/forums/f269/things-leak-35124/ ] and i fixed this issue as well.
Note that this spell is neither MUI nor MPI and can't therefore be used multiple times simultaneously
 
Status
Not open for further replies.
Top