| 08-10-2005, 04:28 AM | #1 |
See Below |
| 08-10-2005, 09:52 AM | #2 |
you would make a unit and player group variable, eg, TempGroup. Do: Set Temp group = Units owned by Neutral Victim. Unit Group - Pick every unit in (Temp Group) and do (Whatever) custom script( call DestroyGroup(udg_TempGroup) ) Something like that. |
| 08-10-2005, 10:33 AM | #3 |
You must be leaving something out. All the examples you named seem to run only occasionally, and without serious looping. For memory leaks to affect gameplay and exit time so much, you need to leak a whole lot more than that. Double check the triggers that run more often, like any fast periodic trigger or a "unit enters region" if you have lots of units walking around... also, whenever you loop a lot, check if there are any leaks in the loop actions, those add up a lot faster than the ocassional leak when you leak one group whenever a hero casts a spell. |
| 08-10-2005, 03:12 PM | #4 |
Triggers Info(1 TIME)-Creates 5 quests Messages(1 TIME)- Sends Strating Messages to All Players Melee Initilization(1 TIME)- Gives Starting Units Bounty(1 TIME)- Turns bounty on for all players Battle Experience(VERY OFTEN)- Whenever A Unit Dies, Increase Level of Ability for Dying Unit Battle Upgrade(VERY OFTEN)- A Unit Enters Playable Map, Set Level of Ability to Upgrade+Ability Count(FEW IF ANY)- Turns number of units and buildings into a message Smart Ally- If A Unit Is attacked between Allied Players, have the owner of the attacking unit declare on the owner of the attacked unit Anti TP- If A Hero Teleports or Uses a Teleportation Item to a allied town hall and declares, remove all units within 700 of the casting unit owned by owner of the casting unit. The Game gets REALLY laggy after like 20 minutes, so much I can barely see what I'm doing anymore. The Battle Experience one does not use any groups(if killing unit is not a group) but its used Alot, like maybe an average of 1000 times a game. Does playing animations also cause this, ebcause in the battle experience one it does that, even though it doesn't work. |
| 08-10-2005, 03:15 PM | #5 |
Are the actions that I mentioned like Pick Every Player in Player Group memory leaks though, cause even if they are not too serious I'd like to make it faster. Also, are killing unit, owner of killing unit considered groups? |
| 08-11-2005, 04:38 PM | #6 |
Sorry about posting again, but its obviously the Battle Experience triggers: Battle Experience Events Unit - A unit Dies Conditions ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True Actions Unit - Increase Level of Battle Experience Army for (Killing unit) Battle Upgrade Events Unit - A unit enters (Playable map area) Conditions Actions Unit - Set Level of Battle Experience Army for (Entering unit) to ((Current research level of War Training for (Owner of (Entering unit))) + (Level of Battle Experience Army for (Entering unit))) How can I fix this so it doesn't lag out? These triggers must run at least a 1000 times a game. Also I tried placing down set tempgroup and destroy but it wouldn't let me save any of it, why is that? |
| 08-11-2005, 05:18 PM | #7 |
Destroying trigger unlags the game, turn off has no or nearly no effect. To destroy current trigger: Custom Script: call DestroyTrigger( GetTriggeringTrigger() ) |
| 08-12-2005, 03:36 PM | #8 | |
Quote:
as far as i can see, noone of those 2 triggers leak. and what did you use that tempgroup for? |
| 08-14-2005, 01:37 AM | #9 |
seems like your psudo code doesn't leak but your real code does, can you link to the map or post a screenshot of the triggers? |
| 08-14-2005, 04:22 AM | #10 |
Info Events Map initialization Actions Creates 4 Quests Messages Events Time - Elapsed game time is 5.00 seconds Actions Game - Display to TempPlayerGroup for 60.00 seconds the text: |cff32cd32Clan FnHr... Custom script: call DestroyTrigger(GetTriggeringTrigger()) Melee Initialization Events Map initialization Actions Melee Game - Use melee time of day (for all players) Melee Game - Give trained Heroes a Scroll of Town Portal (for Melee Game - Limit Heroes to 1 per Hero-type (for all players) Melee Game - Set starting resources (for all players) Melee Game - Remove creeps and critters from used start Melee Game - Create starting units (for all players) Melee Game - Run melee AI scripts (for computer players) Melee Game - Enforce victory/defeat conditions (for all Custom script: call DestroyTrigger(GetTriggeringTrigger()) Bounty Events Map initialization Actions Player Group - Pick every player in (All players) and do (Player - Turn Gives bounty On for (Picked player)) Custom script: call DestroyTrigger(GetTriggeringTrigger()) Battle Experience Events Unit - A unit Dies Conditions ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True Actions Unit - Increase Level of Battle Experience Army for (Killing unit) Battle Upgrade Events Unit - A unit enters (Playable map area) Conditions Actions Unit - Set Level of Battle Experience Army for (Entering unit) to ((Current research level of War Training for (Owner of (Entering unit))) + (Level of Battle Experience Army for (Entering unit))) Smart Ally Events Unit - A unit Is attacked Conditions ((Owner of (Attacked unit)) is an ally of (Owner of (Attacking unit))) Equal to True ((Owner of (Attacking unit)) is an ally of (Owner of (Attacked unit))) Equal to True ((Attacked unit) is in (Units owned by (Owner of (Attacking unit)))) Equal to False Actions Game - Display to (Player group((Owner of (Attacking unit)))) for 30.00 seconds the text: ((SMART ALLY: + (Name of (Owner of (Attacking unit)))) + has attacked you thus declaring war.) Game - Display to (Player group((Owner of (Attacked unit)))) for 30.00 seconds the text: ((SMART ALLY: You have attacked a unit owned by + (Name of (Owner of (Attacked unit)))) + thus declaring war.) Player - Make (Owner of (Attacking unit)) treat (Owner of (Attacked unit)) as an Enemy Trigger - Run Smart Ally On <gen> (ignoring conditions) Trigger - Turn off (This trigger) Smart Ally On Events Conditions Actions Wait 0.10 seconds Trigger - Turn on Smart Ally <gen> EXAMPLE OF TRIGGER THAT WOULD NOT SAVE Remove Left Players Events Time - Every 2.00 seconds of game time Conditions Actions Player Group - Pick every player in (All players) and do (If (((Picked player) slot status) Not equal to Is playing) then do (Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Unit - Kill (Picked unit))) else do (Do nothing)) Set TempUnitGroup = (Units owned by Neutral Victim) Unit Group - Pick every unit in TempUnitGroup and do (Unit - Remove (Picked unit) from the game) Custom script: call DestroyGroup( udg_TempUnitGroup ) |
| 08-16-2005, 05:14 PM | #11 |
Any ideas about what may be lagging out the game so badly? |
