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

[Trigger] Rarely Crashes/Lags/Doesn't do what it's supposed to do when casting

Status
Not open for further replies.
Level 20
Joined
Apr 14, 2012
Messages
2,901
Okay... I am currently making an AoS map which has now a lot of spells in it. One spell in particular, the latest spell, makes the game either crash or does 'something else'. Before I tell you what that is, the spell is suppose to increase the armor and movement speed of the caster and his allies around him.

The dummy ability with the dummy caster is based on Acid Bomb, with the targets 'Air, Ground, Friend, Invulnerable, Vulnerable' respectively, and with the trigger:

  • Warcry Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Warcry
    • Actions
      • Set WC_CastLoc = (Position of (Triggering unit))
      • Unit - Create 1 Warcry Dummy for (Owner of (Triggering unit)) at WC_CastLoc facing Default building facing degrees
      • Set WC_Dummy = (Last created unit)
      • Unit - Add Warcry Dummy to WC_Dummy
      • Unit - Set level of Warcry Dummy for WC_Dummy to (Level of Warcry for (Triggering unit))
      • Unit - Order WC_Dummy to Neutral Alchemist - Acid Bomb (Triggering unit)
      • Unit - Add a 2.00 second Generic expiration timer to WC_Dummy
      • Custom script: call RemoveLocation(udg_WC_CastLoc)
and of course the dummy caster with the dummy ability (should I include the dummy abil to the dummy caster in the Object Editor or just in the triggers?). This is what makes up the spell.

But what I don't understand is why, when the caster casts it, the special effect created from a modified Thunder Clap takes a long time to finish also makes the game lag a lot, sometimes it crashes (2 out of 10 times), and after it resumes the game, the game speed increases like hell. I mean like the counter for the game time doubles in speed, and the gold production also doubles in speed. Not only that but the rivers' animation; actually everything in the game that has an animation doubles or probably triples in animations speed.

Why is that happening? Can somebody help me?

EDIT: Attached a test map (okay in the test map the animation speeding thing doesn't happen. But still the special effect takes longer than the usual time, and the movement speed and armor increase is applied, but can't be of much use because of the lagging)

P.S. It might also possible that the number of doodads and other objects in the original map worsens the time for the effect to finish, and the speed of the animations.

P.S. I'll attach a video of it later.

EDIT2: I tried to change the duration of the movement and armor bonus to a longer duration. Turns out the game slows down during that duration (i.e. If duration == 10, Then game slows down for 10 seconds). Also added a video.
In the video the Hero/Normal duration is 3.00 s.

EDIT3: Added the main map's in-game video of the spell casting

 

Attachments

  • test.w3x
    20 KB · Views: 39
Last edited:
Have you ever tried to disable this trigger and try the trigger which can cause crash?

The trigger seems ok to me.

If your game lags and becomes so fast rapily,that is caused by leak.

Check your codes if you have that.

I only experience this when my dsl connection is not the same with the players i play with the map.
(coz we have so many types of internet connection here)
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Have you ever tried to disable this trigger and try the trigger which can cause crash?

The trigger seems ok to me.

If your game lags and becomes so fast rapily,that is caused by leak.

Check your codes if you have that.

I only experience this when my dsl connection is not the same with the players i play with the map.
(coz we have so many types of internet connection here)

Will do. But it's gonna take me a while. BTW, is there a tool that can detect leaks in JASS? Or probably can JNGP do it itself?
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
@Almia thanks for the DebugLog system... that's a very cool system. Also I've yet to use the Automatic Memory Leak Destroyer... just have to settle a few things in school.

And @Maker sorry but I still get the same result--- also I don't know what you did but the file size got lower by .1kb. I also added a Wait before the dummy casts the spell. Before that wait everything works fine. After which the game slows down. Thanks again for the help.

The ability has 4 levels.

This also makes me wonder: What does 'preload' mean?

Sorry for the late replies... school is taking a huge part of my time right now.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
I've added the main map in-game video of the spell casting. This is done with the Automatic Memory Leak destroyer and with the Table.

I don't know if there's something wrong with the way I implemented it; I mean, I created a new trigger, converted it to custom text, cleared that trigger of its default text (those with the Init_Trig) until nothing's left, then I CnP the system, then did the same steps with the Table.

Is that how it's supposed to be done?
 
Level abilities don't lag, but things like unit types, trees, destructables that weren't loaded can cause a slightly waiting time 0.1~1s
Don't spread shit please. Of course level abilities can create a lag.

Make a map with a unit. Then add a 200 level ability to the unit. = game freeze for a second.
 
Status
Not open for further replies.
Top