Since I didn't mess with those jass, I don't know what's wrong. Here are my doubts.. read starting from from function main to globals
Spoiler:
globals trigger cba= CreateTrigger() rect gg_rct_Hack = Rect( -3008.0, -224.0, -2656.0, 256.0 ) // why not use GetEntireMapRect() location udg_TempLoc = null
endglobals
function RemoveItems takes nothing returns nothing call RemoveItem( GetLastCreatedItem() ) //Remove items that are created previously, really? are they created? endfunction function MoveRects takes nothing returns nothing set udg_TempLoc = GetUnitLoc(GetTriggerUnit()) //sets the temploc to player call MoveRectToLoc(gg_rct_Hack,udg_TempLoc) //move whatever in rect to loc call EnumItemsInRectBJ( gg_rct_Hack, function RemoveItems) //whatever in the full map rect are taking RemoveItems Function endfunction
function main takes nothing returns nothing local integer abc=0 loop exitwhen abc>11 call TriggerRegisterPlayerChatEvent(cba,Player(abc),"-clear",false) set abc=abc+1 endloop call TriggerAddAction(cba,function MoveRects ) //function main looks fine, -clear triggers MoveRects function endfunction
Request a map? Follow the rulesHERE Request templateHERE Please, do not PM me. On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
As u said "why not use GetEntireMapRect()" I only need region around unit not whole map. And what are you thinking about get entire map to unit location????
It is quite simple actually. Notice, that the trigger is running every time a player is writing -clear. Thus, it means the trigger is activated by a PLAYER, not by a UNIT. You have in your code - set udg_TempLoc = GetUnitLoc(GetTriggerUnit()) What is the triggering unit? I think you want it to be on the picked units (notice I said units not unit) So you will need to have the following:
function MoveRects takes nothing returns nothing local group pickedGroup=CreateGroup() //Creating a group for the picked units local unit pickedUnit //the first unit in the group call GroupEnumUnitsSelected(pickedGroup,GetTriggerPlayer(),null) //insert all the picked units to the group loop set pickedUnit=FirstOfGroup(pickedGroup) // Picking the first unit in the group. exitwhen haxUnit==null //end the loop if we don't have any more units // Your code here call GroupRemoveUnit(pickedGroup,pickedUnit) //remove the unit from the group after we have the command. endloop call DestroyGroup(pickedGroup)//remove leaks set pickedGroup=null//remove leaks set pickedUnit=null//remove leaks endfunction
ChatBot: FatherSpace logs into the Chat. (02:24:28) Lanaya: Gtfo ken. (02:24:33) ChatBot: FatherSpace logs out of the Chat. (02:24:40) Lanaya: Thought so. bitch. (02:24:44) ChatBot: FatherSpace logs into the Chat. (02:24:48) FatherSpace: Can I come back yet? (02:24:51) Lanaya: What'd i say earlier. (02:24:51) Lanaya: No. (02:24:58) FatherSpace: Let's try this... (02:25:01) ChatBot: Lanaya has been logged out (Kicked).
(14:33:51) 2Pac: Do you know what'S so funny? (14:34:01) Lanaya: No, please show me. (14:34:07) 2Pac: This. (14:34:09) ChatBot: Lanaya has been logged out (Kicked). (14:34:10) 2Pac:
(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^ (14:36:02) Lanaya: lolz. (14:36:16) 2Pac: I AIN'T DEAD FFS. (14:36:26) 2Pac: I'm a living legend, y'now. (14:37:17) haxorico: why is 2Pac a legend? (14:37:28) Lanaya: He's the worse rapper evar.
(21:53:08) (673237): plzplzplz, im sorry about before. (21:53:26) FatherSpace: I'm sorry you were born. (21:53:31) ChatBot: (673237) has been logged out (Kicked).
Assumed what you're asking for is something that removes everything on the floor. Haxorico's explanation is fabulous.
Request a map? Follow the rulesHERE Request templateHERE Please, do not PM me. On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
If it is for everything on the floor, no need to get the region from the picked units. I assumed there is a radios for the unit, as you can see, I didn't have any code regarding the items.
ChatBot: FatherSpace logs into the Chat. (02:24:28) Lanaya: Gtfo ken. (02:24:33) ChatBot: FatherSpace logs out of the Chat. (02:24:40) Lanaya: Thought so. bitch. (02:24:44) ChatBot: FatherSpace logs into the Chat. (02:24:48) FatherSpace: Can I come back yet? (02:24:51) Lanaya: What'd i say earlier. (02:24:51) Lanaya: No. (02:24:58) FatherSpace: Let's try this... (02:25:01) ChatBot: Lanaya has been logged out (Kicked).
(14:33:51) 2Pac: Do you know what'S so funny? (14:34:01) Lanaya: No, please show me. (14:34:07) 2Pac: This. (14:34:09) ChatBot: Lanaya has been logged out (Kicked). (14:34:10) 2Pac:
(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^ (14:36:02) Lanaya: lolz. (14:36:16) 2Pac: I AIN'T DEAD FFS. (14:36:26) 2Pac: I'm a living legend, y'now. (14:37:17) haxorico: why is 2Pac a legend? (14:37:28) Lanaya: He's the worse rapper evar.
(21:53:08) (673237): plzplzplz, im sorry about before. (21:53:26) FatherSpace: I'm sorry you were born. (21:53:31) ChatBot: (673237) has been logged out (Kicked).
ChatBot: FatherSpace logs into the Chat. (02:24:28) Lanaya: Gtfo ken. (02:24:33) ChatBot: FatherSpace logs out of the Chat. (02:24:40) Lanaya: Thought so. bitch. (02:24:44) ChatBot: FatherSpace logs into the Chat. (02:24:48) FatherSpace: Can I come back yet? (02:24:51) Lanaya: What'd i say earlier. (02:24:51) Lanaya: No. (02:24:58) FatherSpace: Let's try this... (02:25:01) ChatBot: Lanaya has been logged out (Kicked).
(14:33:51) 2Pac: Do you know what'S so funny? (14:34:01) Lanaya: No, please show me. (14:34:07) 2Pac: This. (14:34:09) ChatBot: Lanaya has been logged out (Kicked). (14:34:10) 2Pac:
(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^ (14:36:02) Lanaya: lolz. (14:36:16) 2Pac: I AIN'T DEAD FFS. (14:36:26) 2Pac: I'm a living legend, y'now. (14:37:17) haxorico: why is 2Pac a legend? (14:37:28) Lanaya: He's the worse rapper evar.
(21:53:08) (673237): plzplzplz, im sorry about before. (21:53:26) FatherSpace: I'm sorry you were born. (21:53:31) ChatBot: (673237) has been logged out (Kicked).