Special effects at a point do not work

Status
Not open for further replies.
Level 3
Joined
Dec 12, 2017
Messages
26
Greetings people, a problem occurred a few days ago in my WE, and is that the triggered special effects in a point do not appear in the game, in addition in the previewer of the WE do not appear the models that I imported to the map, and in the game they appear (the default models of the game appear in the visualizer of models in the WE, but if by trigger I make them appear in a point they do not appear in the game, instead if for example I make them appear in the origin of the unit, they appear). I was researching to see how special effects are created and eliminated correctly and I did everything, but they still do not work, I thought it could be that I had corrupted the files of Warcraft 3, so I uninstalled it completely and reinstalled it, but it did not work . I have version 1.30 of the game and I also have version 1.28.5 in a different folder. Thank you for your attention and I hope you can help me.
 
Level 23
Joined
Dec 4, 2007
Messages
1,553
They are immediately removed if you do so via special effects - remove last created sfx?

If so, you could time the removal -
or simply modify a dummy unit to have your desired effect as its model with the locust ability added.
 
Level 3
Joined
Dec 12, 2017
Messages
26
I already timed the removal, still hide the effects in game, i have so much effects afected by this problem so i was looking for another solution:(
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
If they used to work and now they are no longer working you may have to restart your computer. I'm unsure why this happens but if you leave your machine on for long enough certain effects will stop appearing for some reason. A restart fixes the problem though.
 
Level 3
Joined
Dec 12, 2017
Messages
26
Hello, sorry for my bad grammar if I do not express myself well, about restarting my computer, I tried it because I read it in a post on this page, apparently it worked for him, but not for me.
Just as an example, as Pyrogasm asked:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Integer((Distance between (Position of (Triggering unit)) and (Position of Warrior 0036 <gen>)))) Less than 400
      • PuntosGuerrero Greater than 0
      • (Item-type of (Sold Item)) Equal to Damage Bonus - Warrior
    • Then - Actions
      • Set UPGDmgWarrior = (UPGDmgWarrior + 1)
      • Set PuntosGuerrero = (PuntosGuerrero - 1)
      • Special Effect - Create a special effect attached to the origin of Warrior 0036 <gen> using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
      • Special Effect - Destroy (Last created special effect)
      • Animation - Play (Triggering unit)'s spell animation
      • Player - Set the current research level of Damage Bonus - Warrior to UPGDmgWarrior for Player 1 (Red)
      • Multiboard - Set the text for Tabla item in column 2, row 2 to (+ + (String(PuntosGuerrero)))
      • Wait 3.50 seconds
      • Animation - Reset (Triggering unit)'s animation
    • Else - Actions
      • Do nothing
that does work, but if for example I change it to create the effect in the position of the unit, it simply does not appear in the game, but the effect appears in the WE preview.
It's weird, as if the game did not find the effect by throwing it on the "floor"
 
Level 9
Joined
Apr 23, 2011
Messages
527
Try setting a point variable to the position of the unit and creating the special effect there instead.
  • Set Point = (Position of Warrior 036 <gen>)
  • Special Effect - Create a special effect at Point using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
My guess is toonboom doesn't have any named animations so when you create and immediately destroy it without being attached to a unit you see nothing. This is well-known to be the case for models without death animations.

However by attaching it to the unit and then playing its spell animation that tells the attached effect to play its spell animation, which doesn't exist, so it plays its only animation.

Even to me that sounds like crazy reasoning, but it's the only thing I can think of. 2 more things you can try. If either of these work when created on a point we might learn the nature of the problem.
  1. Disable/delete the line that tells the unit to play its spell animation.
  2. Change the effect to something that does definitely have all the right animations, like the Archmage model.
If all else fails you can create a custom spell based on Channel (rawcode 'Ancl') that makes the toonboom art on its target but otherwise has no effect. Spawn a dummy unit and order it to use that custom spell on the hero unit.
 
Level 3
Joined
Dec 12, 2017
Messages
26
My guess is toonboom doesn't have any named animations so when you create and immediately destroy it without being attached to a unit you see nothing. This is well-known to be the case for models without death animations.

However by attaching it to the unit and then playing its spell animation that tells the attached effect to play its spell animation, which doesn't exist, so it plays its only animation.

Even to me that sounds like crazy reasoning, but it's the only thing I can think of. 2 more things you can try. If either of these work when created on a point we might learn the nature of the problem.
  1. Disable/delete the line that tells the unit to play its spell animation.
  2. Change the effect to something that does definitely have all the right animations, like the Archmage model.
If all else fails you can create a custom spell based on Channel (rawcode 'Ancl') that makes the toonboom art on its target but otherwise has no effect. Spawn a dummy unit and order it to use that custom spell on the hero unit.


Well, that worked, the trigger was like this:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Integer((Distance between (Position of (Triggering unit)) and (Position of Warrior 0036 <gen>)))) Less than 400
      • PuntosGuerrero Greater than 0
      • (Item-type of (Sold Item)) Equal to Damage Bonus - Warrior
    • Then - Actions
      • Set Point = (Position of Warrior 0036 <gen>)
      • Set UPGDmgWarrior = (UPGDmgWarrior + 1)
      • Set PuntosGuerrero = (PuntosGuerrero - 1)
      • Animation - Play (Triggering unit)'s spell animation
      • Special Effect - Create a special effect at Point using Abilities\Spells\Items\AIam\AIamTarget.mdl
      • Set EfectosTodos[1] = (Last created special effect)
      • Player - Set the current research level of Damage Bonus - Warrior to UPGDmgWarrior for Player 1 (Red)
      • Multiboard - Set the text for Tabla item in column 2, row 2 to (+ + (String(PuntosGuerrero)))
      • Wait 2.10 seconds
      • Custom script: call RemoveLocation(udg_Point)
      • Special Effect - Destroy EfectosTodos[1]
      • Animation - Reset (Triggering unit)'s animation
    • Else - Actions
      • Do nothing
Using the model of Antonidas, appears in the position of the warrior and then after 2.1 seconds plays his death animation, it is deleted correctly, but using the model of AlamTarget (the effect that is generated when we gain agility through books) does not appear, even when I erase the line to play the spell animation.

So, from what I see, the problem is that you can not use any model for effects at one point, right? It's weird because until a while ago I could do it, I guess I'll have to make dummy's to appear with the model of the effect of skills now do not appear
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Dummies are the easiest solution. Steal the dummy unit/model from Vexorian's xe or Caster System and you can easily attach your desired special effects to one instance of the unit. Doing your own garbage collection so you don't leak special effects might be a bit tedious, though.

If you want to invoke some custom script lines you could use an effect system like xefx to do it for you. As I said you can also do it with custom abilities based on Channel.
 
Level 3
Joined
Dec 12, 2017
Messages
26
I'm going to do those dummies for the effects at a point that does not work for me, as always thanks for your help
 
Level 5
Joined
May 6, 2013
Messages
125
Might be somewhat of a stretch, but if you play the game normally (i.e a normal 1v1 with a computer) and build buildings as nightelf or undead, do the building animations show correctly throught the entire match?
 
Level 5
Joined
May 6, 2013
Messages
125
These symtomps are the most unique ones that are part of a somewhat obscure bug that warcraft 3 had for a couple years now. I had it myself a year or so ago and i still distinctly remember that certain effects did not play correctly when you created them on a point (e.g thunderclap), but worked fine when attached to a unit.

I remember finding the reason for it back then (and not from a warcraft 3 board, nobody there seemed to know the cause), but before i go around the internet and search for that post, i'd rather confirm if it really is that bug
 
Level 3
Joined
Dec 12, 2017
Messages
26
omg...you are right, look at this, I think my w3 files got corrupted in some way, if you can remember the solution would be great
 

Attachments

  • WC3ScrnShot_081018_220522_01.png
    WC3ScrnShot_081018_220522_01.png
    1.7 MB · Views: 223
Level 5
Joined
May 6, 2013
Messages
125
Youre in luck, i actually managed to find the post.

Its not actually corrupted files; the animation plays fine in the preview window of the world editor (as you already wrote in your OP), and if you build these buildings in a custom map with certain triggers you will find that if you put the buildings animation speed to a negative value, the building animation will play from end to start just fine. Furthermore, if you reinstall the game, the bug will typically not go away. Its part of what makes this bug so odd.
I didnt find a solution to it online that actually worked, so i looked a little bit at the wc3 assembly back then. What happens is that for certain animations, the function that is supposed to reset the game time at which the animation started playing (the game uses this time to determine how long the animation has been playing and thus which frame is supposed to be displayed) was not called on certain animations. This resulted in that time value being in a default state which means that the animation either plays as if it started playing at the start of the game (e.g a building you start building after 30 seconds starts its birth animation 30 seconds in), or the default value was so far off that the animation started finished and wasnt shown at all.
Most notably, the function was called correctly if the building was started building outside of vision range, so if you scouted a computer building night elf or undead buildings, those worked just fine.

While i didnt find out why exactly this function wasnt called while looking at the game code (and to be fair, the actual solution is quite unintuitive), i have the luck to be playing a different RTS called Supreme Commander: Forged Alliance (the FAF version, to be exact), and over there, there is a relatively (compared to this bug, anyway) well known sound bug simply known as "the sound bug" that makes every sound in the game only play once until you restart the entire game, that also has the uncanny ability to persist even if you reinstall the game, and most strikingly, i noticed that even though i hadnt launched FAF in a while, after my warcraft 3 had that bug, FAF had its sound bug as well; and sure enough, after fixing the FAF sound bug, the warcraft 3 bug went away as well, which strongly suggests that these are the same bugs.

It sounds odd at first that its a sound bug that causes animation not to play, but if you think about what effects dont play (thunderclap, fire breath), you will notice that they all have sounds attached to them (though there are sfxs with sounds that play just fine, so the exact details seem to be a little complicated, but i didnt find an sfx without sound that was broken). In case of the buildings started outside of vision radius, the sounds dont play, so it makes sense that it works there. My guess is that the sound bug throws some sort of exception that ends up skipping the animation reset function, but gets caught earlier in the attach sfx to unit situation so there it still happens.

You can confirm this by disabling your sound device in the windows hardware manager and then playing the game. You will have no sound (obviously), but the animations should work again.

As for the solution that worked for me, i followed the steps in this post. I don't understand enough about direct sound to know if there is an easier solution that doesnt require you to go into the god damned BIOS (or even understand how a global settings file can cause sounds to not play correctly), but it worked for me, and the bug is so rare that i havnt had it since. I heared from a warcraft streamer that had the bug around that same time that it fixed itself with the next windows update (which would explain why the bug just "goes away after some time"), so it might be easier to just wait for that, but dont quote me on that.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
While i didnt find out why exactly this function wasnt called while looking at the game code (and to be fair, the actual solution is quite unintuitive), i have the luck to be playing a different RTS called Supreme Commander: Forged Alliance (the FAF version, to be exact), and over there, there is a relatively (compared to this bug, anyway) well known sound bug simply known as "the sound bug" that makes every sound in the game only play once until you restart the entire game, that also has the uncanny ability to persist even if you reinstall the game, and most strikingly, i noticed that even though i hadnt launched FAF in a while, after my warcraft 3 had that bug, FAF had its sound bug as well; and sure enough, after fixing the FAF sound bug, the warcraft 3 bug went away as well, which strongly suggests that these are the same bugs.

It sounds odd at first that its a sound bug that causes animation not to play, but if you think about what effects dont play (thunderclap, fire breath), you will notice that they all have sounds attached to them (though there are sfxs with sounds that play just fine, so the exact details seem to be a little complicated, but i didnt find an sfx without sound that was broken). In case of the buildings started outside of vision radius, the sounds dont play, so it makes sense that it works there. My guess is that the sound bug throws some sort of exception that ends up skipping the animation reset function, but gets caught earlier in the attach sfx to unit situation so there it still happens.

You can confirm this by disabling your sound device in the windows hardware manager and then playing the game. You will have no sound (obviously), but the animations should work again.

As for the solution that worked for me, i followed the steps in this post. I don't understand enough about direct sound to know if there is an easier solution that doesnt require you to go into the god damned BIOS (or even understand how a global settings file can cause sounds to not play correctly), but it worked for me, and the bug is so rare that i havnt had it since. I heared from a warcraft streamer that had the bug around that same time that it fixed itself with the next windows update (which would explain why the bug just "goes away after some time"), so it might be easier to just wait for that, but dont quote me on that.
This all points to a pretty serious sound driver bug... If you do suffer from it I suggest restarting your computer (not shutdown, restart to force driver reload) and seeing if it persists. If it comes back restart again, update/reinstall your sound drivers and then restart yet again.

This is similar to the disappearing special effects bug that plagues some Intel integrated graphics. Restart the computer and all special effects start appearing again.
 
Level 3
Joined
Dec 12, 2017
Messages
26
As Imp Midna said, it was a problem with the sound card, so I deactivated the sound card from the bios, I restarted, I turned it on again and the effects now appear correctly. It was a problem that I had been dealing with for several days now, so thank you very much to all of you.
 
Status
Not open for further replies.
Top