• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Action not working why?

Status
Not open for further replies.
Level 13
Joined
Mar 4, 2009
Messages
1,156
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Picked player) Not equal to Player 11 (Dark Green)
          • (Picked player) Not equal to Player 12 (Brown)
        • Then - Actions
          • Set PGROUP = (Player group((Picked player)))
          • Leaderboard - Create a leaderboard for PGROUP titled Allowed feeding 100
          • Leaderboard - Add (Picked player) to (Last created leaderboard) with label Your feeding and value 0
          • Custom script: call DestroyForce(udg_PGROUP)
        • Else - Actions
every player (accept 11 and 12) should have Leaderboard like this

TITLE - Allowed Feeding 100
LABEL - Your Feeding 0
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I believe that converting a player to a player group doesn't leak, so there is no need to remove it.
If you remove the "Set PGROUP = ..." and "DestroyForce ..." it should work.

otherwise, you could try this:
  • Actions
    • For each (Integer i) from 1 to 10, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Player(i)) slot status) Equal to Is playing
          • Then - Actions
            • Leaderboard - Create a leaderboard for (Player group((Picked player))) titled LOL
            • Leaderboard - Add (Picked player) to (Last created leaderboard) with label [label] and value [value]
          • Else - Actions
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
i think this could be the only possible way coz other actions are "to fast"

  • CL
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Evaluation count of (This trigger)))) (NOT NEEDED)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ID[(Evaluation count of (This trigger))] Equal to Human
        • Then - Actions
          • Set PGROUP = (Player group((Player((Evaluation count of (This trigger))))))
          • Leaderboard - Create a leaderboard for PGROUP titled Allowed feeding ...
          • Custom script: call DestroyForce(udg_PGROUP)
          • Leaderboard - Add (Player((Evaluation count of (This trigger)))) to (Last created leaderboard) with label Your feeding and value 0
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Evaluation count of (This trigger)) Equal to 1
        • Then - Actions
          • Trigger - Add to (This trigger) the event (Time - Every 0.01 seconds of game time)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Evaluation count of (This trigger)) Equal to 10
            • Then - Actions
              • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
            • Else - Actions
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
i think this could be the only possible way coz other actions are "to fast"

  • CL
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Evaluation count of (This trigger)))) (NOT NEEDED)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ID[(Evaluation count of (This trigger))] Equal to Human
        • Then - Actions
          • Set PGROUP = (Player group((Player((Evaluation count of (This trigger))))))
          • Leaderboard - Create a leaderboard for PGROUP titled Allowed feeding ...
          • Custom script: call DestroyForce(udg_PGROUP)
          • Leaderboard - Add (Player((Evaluation count of (This trigger)))) to (Last created leaderboard) with label Your feeding and value 0
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Evaluation count of (This trigger)) Equal to 1
        • Then - Actions
          • Trigger - Add to (This trigger) the event (Time - Every 0.01 seconds of game time)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Evaluation count of (This trigger)) Equal to 10
            • Then - Actions
              • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
            • Else - Actions

Woah, what? I just tested my trigger and it works perfectly o_O
No need for something like this.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
nwm,my trigger works but i have action that destroys a leaderboard for player 2 but somehow it destroys leaderborad for every player

i used hide leaderboard instead destroy and now its working

but why is that happening when i do

some unit dies
-destroy leaderboard for owned of unit (dying unit)

and it destroy leaderboard to all players ... -.-
 
Last edited:
Status
Not open for further replies.
Top