Derek0
New Member
- Reaction score
- 1
I just finished fixing all of the memory leaks in my map, and I went to test it. I noticed one of my player loops to disable a skill wasn't working, so I went and looked. This is it:
I don't see anything wrong with that, do you? After further inspection, it seems that all of my player loops that Set PlayerGroup = (All Players) never happen except the first one. Also, when I set the Pick every player to (All Players) instead of PlayerGroup, the second and up ones still don't happen. Also may I note that things like (All allies of Player 12 (Brown)) work fine.
Is it because (All Players) is passed by reference and DestroyForce(udg_PlayerGroup) destroys (All Players) itself? Or is it that all player groups are passed by reference and I only reused (All Players)? Or is it something else?
Thanks in advance
Derek0
Code:
Set PlayerGroup = (All players)
Player Group - Pick every player in PlayerGroup and do (Actions)
Loop - Actions
Player - Disable Channel 1 for (Picked player)
Player - Disable Channel 2 for (Picked player)
Player - Disable Channel 3 for (Picked player)
Player - Disable Channel U for (Picked player)
Custom script: call DestroyForce(udg_PlayerGroup)
Is it because (All Players) is passed by reference and DestroyForce(udg_PlayerGroup) destroys (All Players) itself? Or is it that all player groups are passed by reference and I only reused (All Players)? Or is it something else?
Thanks in advance
Derek0