HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why won't this work..?

02-25-2007, 01:31 PM#1
mikke95
Trigger:
Banlist
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Name of (Picked player)) Equal to WorldEdit
Collapse Then - Actions
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Picked player)) + is banlisted!)
Wait 2.00 seconds
Game - Defeat (Picked player) with the message: Banlisted
Else - Actions

???
02-25-2007, 02:29 PM#2
Preskooldude
Uh, just a thought, but on the tip that appears below "Pick Every Player And DO Actions", it says quote: "...Wait actions should not be used within this function.".
02-25-2007, 02:34 PM#3
SFilip
Indeed, a wait breaks a unit/player group loop.
However in this case you should be able to use a normal for loop and then convert (Integer A) intro a player.
02-25-2007, 06:11 PM#4
mikke95
So it can work if i remove the wait? or do i have to convert a loop integer A into a player?
02-25-2007, 09:08 PM#5
Preskooldude
Either one will do.
02-25-2007, 11:12 PM#6
Pyrogasm
Try this:
Trigger:
Banlist
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Name of (Picked player)) Equal to WorldEdit
Collapse Then - Actions
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Picked player)) + is banlisted!)
Player Group - Add (Picked Player) to Banlisted_Players
Else - Actions
Wait 2.00 Game-Time Seconds
Player Group - Pick every player in (Banlisted_Players) and do (Game - Defeat (Picked player) with the message: Banlisted)
Custom script: call DestroyForce(udg_Banlisted_Players)