• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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