Monday, April 16, 2012

Trigger Kicks player from game.

Somewhere in this series of actions it boots a player fromthe game.

These run if a player enteres -repick. Any help would be great.


Code:
Game - Display to (All players) the text: ((Name of (Triggering player)) +  |cffffcc00Couldnt handle the Pressure!|r)
Selection - Select (Units owned by (Triggering player) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A Hero) Equal to False))) for (Triggering player)
Selection - Remove (Random unit from (Units owned by (Triggering player) of type Peon)) from selection for (Triggering player)
Selection - Remove (Random unit from (Units owned by (Triggering player) of type Wisp)) from selection for (Triggering player)
Unit Group - Add all units of (Units currently selected by (Triggering player)) to RepickGroup
Unit Group - Pick every unit in RepickGroup and do (Unit - Remove (Picked unit) from the game)
Unit Group - Remove all units from RepickGroup
Wait 20.00 seconds
Unit - Create 1 Wisp for (Triggering player) at (Center of WispSpawn <gen>) facing Default building facing degrees
Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cff7777aaNew Wisp Created!|r
Camera - Apply RaceSelectionCamera <gen> for (Triggering player) over 1.00 seconds
|||I don't see anything in there that would remove a player from the game. Any other triggers associated to the repick command?|||nope just that one. only thing is the events which are just the when player 1 enters the text -repick as an exact match or whatever it is and there is 10 of em one for each player. But the drop is wierd me and my bro were testin the map and it would always drop him (i was host) no matter what color he was or who used it.|||I know this one is outdated, but if there is still someone looking for a solution, I think it kicks players or does other weird things because you first remove the triggering unit and then try to get the owner of the triggering unit which you just removed. And it's fired by the player, not by some unit.|||Actually, there is no triggering unit, only a triggering player, so (Triggering unit) shouldn't be used. Still, don't see why it's dropping the player. The only thing that comes to mind is that GetTriggerUnit might be returning a different result for each player (I'm not sure what it returns in cases like this), which would likely cause a desync when used with GetForceOfPlayer, as forces are handles.

Whether I'm right or wrong about the cause of the player dropping, you should replace (Owner of (Triggering unit)) with (Triggering player).

EDIT: Wait, what? This is from 2006. o.O

No comments:

Post a Comment