Destroying Player Group Variables

AEK

New Member
Reaction score
0
This is quick and simple :p

How do i destroy Player Group Variables? Is it:

> call DestroyPlayerGroup (udg_my_var) ?

Or something like:
> call DestroyForce (udg_my_var) ?

Thanks in advance! AEK
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
According to my knowledge, you don't need to.
If you do, check the options that GUI gives.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Player Groups do leak. Except for All Players. That never leaks. Don't destroy it.

call DestroyForce(udg_SomeForce)
 

AEK

New Member
Reaction score
0
Oh ok, well my player group selects all players who are controlled by a user not computers... So it creates units at a location... Would i need to destroy that, since it is not selecting all players? And i put the "call DestroyForce (udg_tmp_spawn_group)" but it will not allow me to keep the trigger enabled, because of that script...
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Would i need to destroy that, since it is not selecting all players?

Yes.

> And i put the "call DestroyForce (udg_tmp_spawn_group)" but it will not allow me to keep the trigger enabled, because of that script...

I'll need to see the whole script....
 

AEK

New Member
Reaction score
0
Code:
Map Initialization
    Events
        Map initialization
    Conditions
    Actions
        [COLOR="Red"]Set tmp_spawn_player_group = (All players controlled by a User player)[/COLOR]
        Set tmp_spawn_point = (Center of Init Start <gen>)
        Player Group - Pick every player in tmp_spawn_player_group and do (Actions)
            Loop - Actions
                Unit - Create 1 Sorceress for (Picked player) at tmp_spawn_point facing Default building facing degrees
        Custom script:   call RemoveLocation (udg_tmp_spawn_point)
        [COLOR="Red"]Custom script:   call DestroyForce (udg_tmp_spawn_group)[/COLOR]

Also, i just tested my map then and it still creates units for computer players instead of user players
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Custom script: call DestroyForce (udg_tmp_spawn_group)

Custom script: call DestroyForce(udg_tmp_spawn_player_group)

> i just tested my map then and it still creates units for computer players instead of user players

How do you have Scenario Properties set up?
If all else fails, you might try adding an If/Then/Else to check again for Player Controller.
 

AEK

New Member
Reaction score
0
i've already got two forces set up, red and yellow being the bases (as in the case of dota except red and green) and 3 players on each side.. Im guessing that will interfere with this trigger?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Im guessing that will interfere with this trigger?

I don't know what your intent is with this trigger.
Only you will know if the actions of that trigger will hamper your efforts....
 

AEK

New Member
Reaction score
0
What i am trying to accomplish wit hthis trigger is:

On map initialisation i want a sorceress to be created for each player who is controlled by a human, so that i wont have any unused sorceresses lying around the starting area for players who arent even in the game.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
You'll probably want to add a check that checks the Slot Status of the Picked Player.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top