How to remove Player Group leak?

Status
Not open for further replies.
Create an array which you store the force belonging to each player in at map init. Use the player number as an index.

  • Events
    • Map initialization
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 16, do (Actions)
      • Loop - Actions
        • Set Force[(Integer A)] = (Player group((Player((Integer A)))))
and then read Force[(Player number of <player>)] when you need it.
 
Create an array which you store the force belonging to each player in at map init. Use the player number as an index.

  • Events
    • Map initialization
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 16, do (Actions)
      • Loop - Actions
        • Set Force[(Integer A)] = (Player group((Player((Integer A)))))
and then read Force[(Player number of <player>)] when you need it.

Best GUI solution I think.
 
I am sad to say but i don't understand how i can use it in removing the leak using the event -clear.Can you create a trigger with
Event
Player 1 types -clear
Action
Camera-Clear messages of Player Group (Triggering Player)

Then apply your solution on removing the leak.Or on the other hand create this trigger and remove the leak.so i just copy it to my map.+ rep
 
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -clear as An exact match
    • Conditions
    • Actions
      • Set pgrp = (Player group((Triggering player)))
      • Cinematic - Clear the screen of text messages for pgrp
      • Custom script: Custom script: call DestroyForce(udg_pgrp)
pgrp is a player group variable.

An alternative method is to do what WaterKnight did. Then use
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -clear as An exact match
    • Conditions
    • Actions
      • Cinematic - Clear the screen of text messages for Force[Player number of triggering player]
 
Status
Not open for further replies.
Back
Top