HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Complete Anarchy

08-11-2009, 05:20 AM#1
Pyrogasm
I'm not really sure what I did, but I just achieved total anarchy among my own units.

I was fooling around trying to get my PlayerSwitch library to work when I tried a few odd things and ended up making my own units autoattack against themselves, and all of the enemy players did the same.

I thought I'd share this here in case someone can shed light on what exactly I did. I think it has something to do with my Alliance-setting textmacro loop, but I'm not entirely too sure.

Expand JASS:

The code is above, and if you want to test this out in-game download the attached map and test it. Once in-game, do the following:
  • Type "-switch 1"
  • Type "iseedeadpeople"
  • Select a majority of the footmen and tell them to stop moving
  • Watch what happens

Yeah...
Attached Files
File type: w3xPlayerSwitch Test.w3x (117.8 KB)
08-11-2009, 05:26 AM#2
Vexorian
this reminds me of
http://www.wc3c.net/showthread.php?t=91569

hmnn I should really reserve some time to revive old spells now that none of them works...
Quote:
//Textmacroes make our lives easier and code much cleaner!
if only.
08-11-2009, 05:38 AM#3
Pyrogasm
Good point...
08-11-2009, 06:46 AM#4
Bobo_The_Kodo
You just remove players ALLIANCE_PASSIVE with themselves
08-11-2009, 06:52 AM#5
snowtiger
That's... insane. Your own units are enemies. You can't give your own units orders exept gather and repair. I think a lot of people have searched to do this with only one unit for a spell :/
08-11-2009, 08:57 PM#6
Archmage Owenalacaster
Collapse JASS:
scope CivilWar initializer init
    
    private function init takes nothing returns nothing
        local player p = GetLocalPlayer()
        call SetPlayerAlliance(p,p,ALLIANCE_PASSIVE,false)
    endfunction
    
endscope
08-11-2009, 09:40 PM#7
moyack
best code evar...