• 🏆 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!

Is there something wrong with this trigger?

Status
Not open for further replies.
Level 13
Joined
Jun 5, 2008
Messages
504
It works perfectly, but It gives lagg if I spam it. The lag ocurs after i spam the spell with like 20 times and cast the spell again. The lagg is ONLY when i cast the spell again (first few spells doesnt lagg at all). I spam the spell with 0 cooldown to see how it works.

The trigger might look a bit messy since i mix locals and no variables with groups, but it should be fine if it doesnt leak?

And any ideas what could cause the lagg? Something doesnt get destroyed properly maybe?

Ok here is the triggers:

attachment.php


*EDIT* Changed some stuff, it should work better now, but it still causes the lagg....
 

Attachments

  • tirgrs.JPG
    tirgrs.JPG
    99.7 KB · Views: 223
Last edited:
Level 13
Joined
Jun 5, 2008
Messages
504
Neither worked....

This really sux, I dont want to make more spells while I cant get this working properly (the lagg issue).

I tried removing the units and waiting, but the lagg always comes when I cast the spell.

What makes it weird, why does it only lagg when i cast the spell again...this kind of thing never happened with wc3 editori :cry:.

I dont know if I should try to make spells another way, like using effects search function...it could be usefull, but im not too familiar with data editor yet.


*edit* Oh and im really stuck with this...I dont know what I could do to spot the problem. I checked using text display that units gets removed from groups...So if you go any ideas, im happy to test them. The problem also isnt related to last part of trigger where I add buff and actor, since the lagg starts even if I dont hit enemy units...
 
Level 8
Joined
Sep 1, 2009
Messages
124
1) How does the trigger start? theres obviously a trigger that turns i on.
2) Im not smart, but think it could be the .003 and the making a unit/dummy/actor/buff that spams that kind of thing..

Try running it without the .003 event, just make the trigger run without any periodic event, it could be lagging because of it.. I know i would stay away from that kind of thing :p
 
Level 13
Joined
Jun 5, 2008
Messages
504
1) How does the trigger start? theres obviously a trigger that turns i on.
2) Im not smart, but think it could be the .003 and the making a unit/dummy/actor/buff that spams that kind of thing..

Try running it without the .003 event, just make the trigger run without any periodic event, it could be lagging because of it.. I know i would stay away from that kind of thing :p

In wc3 I had no problems with periodic events. And Im quite sure the periodic trigger is where the problems is...but it could be true that too much spam is too much...

Anyway here is the starting trigger in case it helps someone....

attachment.php
 

Attachments

  • tirgrs2.JPG
    tirgrs2.JPG
    33.1 KB · Views: 154
Level 13
Joined
Jun 5, 2008
Messages
504
Are you sure you are not leaking actors due to incorrect actor event setup?

What do you mean? In the periodic trigger even if I remove the actor adding part it still causes the lagg...

Is there some other way my actors could leak? I dont see where I could use them wrong. Or maybe the model actor on the dummy unit could be set wrong...But I dont really know anything about actors...
 
Level 13
Joined
Jun 5, 2008
Messages
504
I got 4gigs of memory. That actor destroying sounds interesting...I think i will have to look from other models if there is a difference...As I said I dont really know anything about actors so dunno what to look....

*edit* I tried using normal unit instead of dummy unit. Still causes the lagg after spamming the spell......I quess im at a dead end now, dunno should i try something else. Or maybe even give up mapping if I cannot get simple spell like this to work...or my pc cant handle it or whatever :<.

Another Idea is that something just leaks in the periodic trigger...I dont know what and I dont know how should I find it, since I got no idea how the garbage system works...PFF

"8. Will there be improvements on the "Garbage Collector" for the new language? For example, in JASS all local variables need to be set to null at the end of their use, and certain data-types need to be removed from the game (such as Locations) at the end of their use to avoid memory leaks.
Galaxy features a robust garbage collection system for all native types, which is a huge improvement over WarCraft III (which technically did not have a garbage collection system at all). The script memory leak issues from WarCraft III will be a thing of the past. "

So can I even make leaks? FFS AFFGEhgaweh
 
Last edited:
Level 9
Joined
Nov 4, 2007
Messages
931
Try uploading your map and have others take a look at it, visualizing how it would look and understanding its relation with the data editor and other triggers is difficult to visualize with just the periodic trigger showing.
 
Level 11
Joined
Aug 1, 2009
Messages
963
Does the lag persist long after whatever dummy unit is destroyed?

Also, does the dummy unit have like a timed life or so? Otherwise, it could continue moving on indefinitely.

Just try using the spell 20 times at moderate intervals, and see if it lags AFTER that.

If you still have trouble, upload the map or something so we can look at it.
 
Level 13
Joined
Jun 5, 2008
Messages
504
I quess uploading is best sollution. There is some unnececary stuff there so it might be messy....But its just testing learning map for me....

Indeed dummy has timed life buff. Should it be removed too after it dies or what?

If you spam it like 50 times, you should see it lagging
 

Attachments

  • TestMap.SC2Map
    182.2 KB · Views: 61
Level 13
Joined
Jun 5, 2008
Messages
504
Im going to try and test action definition system and compare how much better that works...

Anyway anyone tested the map? I do not know does it lagg if you dont spam it, but Im still concerned that when you make a map it might cause leaks because too much effects or so....
 
Level 13
Joined
Jun 5, 2008
Messages
504
Just wanted you to know that action definition is definnetly the way to go. Its pretty simple to use and that tutorial really helped a lot in geting to know action definitions (Atleast the map and triggers that you could dl from tube description).

I spammed the same spell like 100+ times and no lagg with action definition...I quess I could have made my periodic trigger the same way too (using units movement instead of moving the unit), that seems to lessen the actions/lagg greatly.

Well thanks for everyone in helping. Ill give you some +rep. And I can start mapping again with this.
 
Status
Not open for further replies.
Top