• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Custom Ability Buff SFX refuses to loop.

Status
Not open for further replies.
Level 12
Joined
Jan 30, 2020
Messages
875
Hello there.

Still working on my map, and now the Lua conversion if finished and working perfectly, I am trying to fix old issues that I never really managed to fix before.

So far I believe I have fixed all of them, except a problem I have been banging my head on the wall for days without finding a solution.

Quick reminder, my map is an uncommon TD, focused on mazing, and with attacking creeps being balls, giant balls, flying balls and flying giant balls. Balls spawn at regular interval during the level, and they follow a series of 8 waypoints before heading to the final destination.

The most powerful Anti-Air tower in the map is called "Tamed Flyng Ball", and it has a custom spell I called "Go Back Home".

This spell is based on Faerie Fire, is autocast (that can be disabled). "Always Autocast" in object editor is set to true, though I still had to trigger the autocast because the AI does not seem to always understand what "always" means :)

What the spell does is change the current destination (waypoint) of the target Ball and sets it to the first waypoint, making the Ball waste time and allow towers to hit it for a longer period of time.
To prevent overcasting, and for visual fun, the spell applies a buff lasting 3600 seconds with a special effect that shows the text "Go Back Home!" pulsing on the overhead of the Ball. When a Ball is under the effect of this Buff, the spell cannot be cast on it again.
Finally, when the Ball reaches the first waypoint, the buff is removed and the Ball is ordered to go to the second waypoint to go back to its usual itinerary.



All functional parts of the spell work perfectly, it does exactly what I explained, and is so far bug-proof in the many different situations I have tested, but there is a big problem with the special effect :

- The pulsing text special effect only plays its Global Sequence animation once (it also has a stand animation).

Here are screenshots to show you the problem :

- When the Ball is affected by the spell, everything works fine :

GBH1.png


- Then after playing the first "pulse" animation, the text disappears :

GBH2.png



As further information, here are the object editor entries :

- The Ability :

GBH3.png


- The Buff :

GBH4.png



Note that I have tried using a separate effect rather than just a buff, but Faerie Fire seems to be hardcoded to only use a buff and no effect.

Now my "Go Back Home!" model is just like all my other special effects, and have the same kind of animation settings, I double checked that in the MDL. It's a tiny model, so here is the MDL code :

Code:
//This model was converted from MDX by ogre-lord's Java MDX API and Retera's Java MDL API
// Saved by Retera's MDL Toolkit on Fri May 01 18:10:18 CEST 2020
Version {
   FormatVersion 800,
}
Model "GoBackHome" {
   NumGeosets 1,
   NumBones 1,
   NumAttachments 1,
   BlendTime 150,
   MinimumExtent { -240, -240, -240 },
   MaximumExtent { 240, 240, 240 },
   BoundsRadius 240,
}
Sequences 1 {
   Anim "Stand" {
       Interval { 0, 1000 },
       MinimumExtent { -240, -240, -240 },
       MaximumExtent { 240, 240, 240 },
       BoundsRadius 240,
   }
}
GlobalSequences 1 {
   Duration 1000,
}
Textures 1 {
   Bitmap {
       Image "Custom Textures\GoBackHome.blp",
   }
}
Materials 1 {
   Material {
       ConstantColor,
       Layer {
           FilterMode Transparent,
           Unshaded,
           Unfogged,
           static TextureID 0,
       }
   }
}
Geoset {
   Vertices 6 {
       { 0, -275, 275 },
       { 0, 275, 275 },
       { 0, 275, 275 },
       { 0, 275, 80 },
       { 0, -275, 80 },
       { 0, -275, 80 },
   }
   Normals 6 {
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
   }
   TVertices 6 {
       { 0, 0 },
       { 1, 0 },
       { 1, 0 },
       { 1, 0.87 },
       { 0, 0.87 },
       { 0, 0.87 },
   }
   VertexGroup {
       0,
       0,
       0,
       0,
       0,
       0,
   }
   Faces 1 6 {
       Triangles {
           { 3, 2, 4, 0, 5, 1 },
       }
   }
   Groups 1 1 {
       Matrices { 0 },
   }
   MinimumExtent { -240, -240, -240 },
   MaximumExtent { 240, 240, 240 },
   BoundsRadius 240,
   Anim {
       MinimumExtent { -240, -240, -240 },
       MaximumExtent { 240, 240, 240 },
       BoundsRadius 240,
   }
   MaterialID 0,
   SelectionGroup 0,
}
Bone "GoBackHomeText" {
   ObjectId 0,
   Billboarded,
   GeosetId 0,
   GeosetAnimId None,
   Scaling 3 {
       Linear,
       GlobalSeqId 0,
       0: { 1, 1, 1 },
       500: { 0.5, 0.5, 0.5 },
       1000: { 1, 1, 1 },
   }
}
Attachment "Origin Ref" {
   ObjectId 1,
}
PivotPoints 2 {
   { 0, 0, 177.5 },
   { 0, 0, 0 },
}


Is there anything that can be done to make sure the text loops its pulsing animation until the buff is removed ?

Note : I also tried adding the effect with a trigger instead than with the buff, but then I had issues removing the effect in certain conditions.
 
Level 12
Joined
Jan 30, 2020
Messages
875
Alas, as you can see in the MDL, the animation doesn't have the "NonLooping" property.

I gave up for a moment as I felt stuck, and after working on some models to keep improving the map visuals, I had the simple obvious idea of using the original buff special effect : faerie fire.

Well it seems my model is working perfectly fine, as fire fire model, that is supposed to stay and loop until the end of the buff, also disappears.
I also tried with my new aura model, as well as other aura models from the game because these models are made to stay once attached, and it resulted with the same strange symptoms.

Something is messing the buff special effect, and I fail to understand what, as you can see in my object editor fields, I have not messed up anything (at first sight). Or maybe the huge duration of the ability has an impact (although I don't see why).

The only time I do something to the buffs with my Lua code is when I remove the buff when the Ball reaches the first waypoint. But then again the effect disappears much before.

It seems like, since I came back to the map making world, my grand specialty is to discover inexplicable bugs, just like the weather effects that still refuse to work in my map for reasons coming straight from The Twilight Zone.

But I will never give up, whatever obstacle the game puts in my way :D

Anyways, I just came up with an idea : as the game seems to play the global sequence that makes the text Pulse, but just for the duration of the Stand animation, I think I will try to give the model an insane long Stand duration.

Crossing fingers !

EDIT :


LOL... what did I expect. it works, except now the text stays permanently on the flying balls :

WC3ScrnShot_050220_202700_001.png


I suppose the game is still playing the Stand animation (I set it to 10 000 seconds) till the end even when the Buff is removed.

I still have a last option before trying to add/remove the sfx with code and see if it is looping. If it is, all I have to do for the text to disappear as soon as I destroy the sfx is give it a very short Stand animation.

I could also try adding the sfx with another ability, like I used to do for the wings before I made the unified flying ball model, I remember the wings were indeed staying in all circumstances. I suppose removing the ability with triggers would be even more efficient that attaching special effects ?

EDIT 2 :

Well in the end I removed the model from the buff, used an ability based on Sphere with the model and the overhead attachment, and as soon as the effect of the spell is triggered, I also add the ability based on sphere, and remove it when I remove the buffs.

To make this work, I did like I said, I gave the stand animation for the text model a short duration (100 ms) then it disappears nearly instantly on removal :

WC3ScrnShot_050220_204907_001.png


So I am pleased I solve the issue, but I am sad to still not know what caused it.
 
Last edited:
Level 12
Joined
Jan 30, 2020
Messages
875
Your mistake was coming back to mapmaking around the release of Reforged, lol. This game man... if only the modders could work on the editor themselves, the bugs would be fixed overnight.

Thats the statement with the most truth ever :D
 
Level 12
Joined
May 13, 2017
Messages
142
This may be a very late reply to this thread but whoever has the same problem may benefit from reading my response.
I just had the same problem and asked the same like you just did. The same method that worked in classic now doesn't work on Reforged and I wondered why.

It was the Settings that caused the problem. My settings for Spell was set to Low, so the buff only shows itself once without looping.

For the models to loop naturally as they should, we just need adjust your spell settings to High.

I hope it help.
 
Status
Not open for further replies.
Top