is it possible to unally yourself?

Red_drake

New Member
Reaction score
4
or is there a way for your own units to treat eachother as enemies, or be able to auto attack eachother?

(background)
a swam of units needs a 'controler' type unit around them (control is represented by mana atm), and when control(mana) reaches 0, they go 'feral' and attack everything (including their allies).
it would be easy to put them on some neutral hostile team, but then 'feral' units wouldnt attack eachother.

is there a way to do this so that a single unit is allied to no player/computer?
 
all units or none, such options is player based.

call SetPlayerAlliance(Player(0), Player(0), ALLIANCE_X, false)
 
The only way to make units attack friendly units is to order them to do so. The AI behavior will never do it. Use a periodic trigger to pick all units of the type that lacks the debuff and order them to attack a nearby random unit. Use a second trigger which detects when the player tries to issue an order to the unit and override that order in the trigger (be sure to turn off the trigger every time you issue an order through triggers to avoid creating an infinite loop).
 
well, thats lame and seems overly complicated : (

will DioD's solution even work?

if not, i guess ill have to trigger it all
 
You'd have to trigger it all, for you can only ally/unally players, indeed. You can unally yourself, though. It will take away the control from your own units, that's pretty much all it'll do.
 
control and ally mode if different attributes.

you can unally self, soo your units will attack each other BUT keep vision and control over them.
 
you can unally self, soo your units will attack each other BUT keep vision and control over them.
I've tried, but can't get my own units to attack each other automatically. Can you please post a demo map where it works?
 
call SetPlayerAlliance(Player(0), Player(0), ALLIANCE_PASSIVE, false)

this is demo map, have fun and read post 2.
 
I don't see a map, but I was able to get it to work. :) Neat!

As it turns out, my problem was trying to do it in GUI, not realizing that
Trigger:
  • Player - For Player 1 (Red), turn Alliance (non-aggression) Off toward Player 1 (Red)
would not work because that GUI action calls [ljass]SetPlayerAllianceBJ[/ljass], which prevents alliance changes toward the same player. Using your line as a custom script worked.
 
so i can just do what DioD said and ully myself in jass and itll work?

awesome! thanks :D

now, the fun part.

if im using neutral passive and neutral hostile players, what computer team should i give these 'feral' units to?
also, playesr 0-11 are used as well, 13 is my neutral passive player, and neutral hostile units are placed using the 'neutral hostile' player when placing units directly in the editor.
 
Well, any of the unused Neutral players would work OK. Just set them to be enemies with every other player first.

Also, you'll need a way to remember which player used to own the units in order to restore control.
 
that shouldnt be a problem.

also: players 0-11 are taken, player 13 is taken, is player 12 the "neutral hostile" player? or is that another player entirely?
 
Player(12) is Neutral Hostile, you're using 13 (Neutral Victim), but there's also 14 (Neutral Extra) and 15 (Neutral Passive).
 
dont use neutral hostile for any applications, it have hardcoded AI and hardcoded minimap display.

also do not ally youself with any neutrals, it will glich vision (you will see projectiles over fog of war and other problems)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top