| 01-21-2010, 11:31 AM | #2 | ||
Quote:
I don't see the sense here. Quote:
|
| 01-21-2010, 11:54 AM | #3 |
But they're all just variables. They get destroyed afterwards. Right? I mean, there's that "function" in there. |
| 01-21-2010, 11:58 AM | #4 | ||
Wehrm, but you never actually destroy them. Quote:
Quote:
|
| 01-21-2010, 12:07 PM | #5 |
Oh damn, so basically I have to create variables FOR variables so they wont leak? LOL I never realised that. Let me try this. Thanks, and let me know if you can think of something else :) |
| 01-21-2010, 12:19 PM | #6 | |
Quote:
|
| 01-23-2010, 05:10 PM | #7 |
Damnit, it's still causing lags after 5-6 uses... Does anyone know of a similar trigger which does basically the same thing but doesn't lag? I'm getting a bit sick of this one (literally, the lags is causing me to feel nauseous) but I don't wish to change it. |
| 01-24-2010, 02:32 AM | #8 |
Post the new code. |
| 01-24-2010, 07:54 PM | #10 |
You are leaking the locations rammerposition and Ram_loc in the movement trigger, that is 40 locations per second. Also, it seems like it is possible for the spell to do double or even triple damage if the rammer comes in range of multiple units with one periodic move (since Ram Stop would be run multiple times). |
| 01-24-2010, 10:21 PM | #11 |
Holy crap 40 locs/second... No wonder it drops 10 fps per use. Can you be specific as to where it's leaking? I'm not going to lie, I'm still hazy about what causes leaks and what doesn't. Thanks, mate. |
| 01-24-2010, 10:33 PM | #12 |
"Set rammerposition = (Position of rammer)" You are creating a new location and storing it in the rammerposition variable here without first destroying the location that was stored in that variable previously. "Set Ram_loc = (rammerposition offset by 50.00 towards (Facing of rammer) degrees)" Same here, only for Ram_loc. |
| 01-24-2010, 10:36 PM | #13 |
group also leak, do this Trigger: ![]() Custom script: set bj_wantDestroyGroup = true
![]() Unit Group - Pick every unit in (Units within 200.00 of (Position of rammer) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Owner of rammer)) Equal to False)))) and do (Actions)or store the group instantly to a variable, and then destroy it manually Trigger: ![]() Set GroupVar = Pick every unit in (Units within 200.00 of (Position of rammer) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Owner of rammer)) Equal to False)))) and do (Actions)
![]() Unit Group - Pick every unit in GroupVar and do (Unit - Hide (Picked unit))
![]() Custom script: call DestroyGroup(udg_GroupVar) |
| 01-24-2010, 11:07 PM | #14 |
Wait let me get this straight... Storing something in a variable doesn't delete/clear the previous one? Why did I get an impression that it overwrites the previous "set"/store function? Is what you're saying before I store another position I have to first clear/destroy the previous position first? |
| 01-25-2010, 03:43 AM | #15 |
Nope it doesn't delete. Instead it points the variable towards the new position. Leaving that old position hanging therefore leak because you can't point it back anymore. |
